Programming heatsink fan controller - ArrowElectronics/Agilex-5 GitHub Wiki

Programming Heatsink Fan Controller

The AXE5-Eagle board is shipped with a passive heatsink and a 4-wire fan as optional components to add on top of the FPGA. Should you choose to use them, this reference design helps you tone down the fan noise by programming its controller to be temperature sensitive.

The AXE5-Eagle board has a MAX31760 Fan Controller used to sense a remote temperature sensing diode inside the Agilex-5 and control a 4-wire fan based on the temperature measured. The MAX31760 is highly programmable and provides many features. The AXE5-Eagle board is shipped with the MAX31760 having the default fan PWM duty cycle of 100% for all temperature measurements. In order to reduce the fan noise, the user may choose to configure the controller for other PWM settings. This reference design shows you how it can be done and saved in the controller's NVM.

Design Project

The Quartus project uses a NIOS®-V soft CPU along with a few peripherals, as seen in the figure below:

The design has many components. Some are extra and used for other tasks.

Key Components:

  • sys_pll : PLL for multiplying the 25MHz input oscillator to 150MHz system clock
  • NIOS-V : The 32-bit RISC-V soft CPU
  • OnChip RAM : Holds the compiled C code for the NIOS-V to run
  • I2C : I2C Master used to communicate with Fan Controller
  • LW UART : a 115200 baud UART for STDIO

Additional Components:

  • PIO PB : 2-input GPIO for push-buttons
  • PIO LED0 : 3-output GPIO for driving RGB LED
  • System ID : 32-bit register holding an arbitrary value (for uniqueness)
  • JTAG MASTER : JTAG debug channel for controlling the CPU bus
  • MAILBOX CLIENT : IP block for accessing the FPGA temperature sensors and Voltage measurement ADCs in the SDM module

The MAX31760 I2C bus is connected to the Agilex-5 HPS I2C. Since we are not using the HPS, we need a hardware bypass for the NIOS-V to access it via the FPGA fabric. For this, we use 2 pins on the CRUVI-LS (C_LSZ) connector. The wiring diagram is shown below:

Operation

The project SOF file has both the hardware and software components in it. When the user downloads it into the Agilex-5, it displays a list of available commands, on the terminal. For the purposes of programming the Fan Controller, the "F" and "D" commands are used.

If the I2C wiring is not done, an error message is displayed.

The "F" command programs the table below into the MAX31760 NVM.

The "D" command displays the Fan PWM duty cycle and the RPM it is running at.

The other commands interact with the Agilex™ 5 SDM to display device's JTAG ID, Chip ID, on-die temperature sensors, and voltage rails entering the FPGA.

Return - Reference Designs
Return - Table of Contents
Return - AXE5-Eagle Platform