Software Implementation
Figure 18. Board Management Controller Software Flow
The following is the flow of the design example:
- During system start up
- Initialize system variable
- Initialize peripheral (ADC, power module, system fan, UFM, timer, and watchdog timer)
- ADC
- Reset to stop the ADC sample
- Power module
- Set the I2C frequency to 400 KHz
- Enable the On/Off control of the power module through PMBus
- Turn off all power module
- Turn off the LED indicator on the development kit
- System fan
- Set the fan speed to medium (50% duty cycle)
- UFM
- Read the last UFM address data is 0xE0000000
- If true, the UFM content is not erased
- If false, the UFM content will be erased
- When the UFM is clear, it will be showing the full LED indicator
- Timer
- Enable timer for the voltage and temperature monitor
- Watchdog timer
- The watchdog timer resets the board management controller if it is not responding after 10 seconds during power up or power down
- ADC
- Initialize system interrupt
- Enable interrupt for the PMBus ALRT line
- Enable interrupt for the button action
- Enable interrupt for the timer
- Enable interrupt for the UART receive
- After the completion of all initialization
- Board management controller turn on the power supplies by power group
- Preset voltage for each group:
- Group 1 at 0.9 V
- Group 2 at 1.0 V
- Group 3 at 1.2 V
- Power-up sequence based on the Intel® Stratix® 10 FPGA—Group 1 to Group 2 to Group 3
- Power-down sequence based on the Intel® Stratix® 10 FPGA—Group 3 to Group 2 to Group 1
- Preset voltage for each group:
- Four waiting input:
- Wait for the press button
- Once press button, check if the flag for all power modules is turn on or turn off
- If turn off, proceed to power up the power modules using the power-up sequence
- If turn on, proceed to shut down the power modules using the power-down sequence
- Wait for the timer to trigger voltage and temperature measurement
- Upon reaching the five seconds interval, the board management controller triggers the ADC to check the temperature of the Group 1, Group 2, and Group 3 voltage regulators and the Intel® MAX® 10 FPGA
- Voltage
- Review all three modules to ensure there is no voltage supply that violates the preset voltage
- Any violation of the preset voltage will have data log into the UFM
- Temperature
- Any violation of the preset temperature will have data log into the UFM
- High temperature preset—50°C
- Low temperature preset—20°C
- System fan
- Fan with PWM duty cycle of 100% if high temperature is detected (50°C)
- Fan with PWM duty cycle of 30% if low temperature is detected (20°C)
- By default, fan with PWM duty cycle of 50%
- Any violation of the preset temperature will have data log into the UFM
- Wait for the user input from the USB
- Preset commands in the firmware—read voltage, set timer, read UFM, delete UFM, and preset threshold voltage
- Each command has an integrated function
- Watchdog timer check
- Wait for the press button
- Board management controller turn on the power supplies by power group