sysmonpsu
Xilinx SDK Drivers API Documentation
xsysmonpsu_low_level_example.c File Reference

Overview

This file contains a design example using the basic driver functions of the System Monitor driver.

The example here shows using the driver/device in polled mode to check the on-chip temperature and voltages.

Note

The values of the on-chip temperature and the on-chip Vccaux voltage are read from the device and then the alarm thresholds are set in such a manner that the alarms occur.

MODIFICATION HISTORY:
Ver   Who    Date     Changes

1.0 kvn 12/15/15 First release mn 03/08/18 Update code to run at higher frequency
 

Functions

int SysMonPsuLowLevelExample (u32 BaseAddress)
 This function runs a test on the System Monitor device using the basic driver functions. More...
 
int main (void)
 Main function that invokes the example given in this file. More...
 

Function Documentation

◆ main()

int main ( void  )

Main function that invokes the example given in this file.

Parameters
None.
Returns
  • XST_SUCCESS if the example has completed successfully.
  • XST_FAILURE if the example has failed.
Note
None.

References SysMonPsuLowLevelExample().

◆ SysMonPsuLowLevelExample()

int SysMonPsuLowLevelExample ( u32  BaseAddress)

This function runs a test on the System Monitor device using the basic driver functions.

The function does the following tasks:

  • Reset the device
  • Setup alarm thresholds for on-chip temperature and VCCAUX.
  • Setup sequence registers to continuously monitor on-chip temperature and VCCAUX.
  • Setup configuration registers to start the sequence.
  • Read latest on-chip temperature and VCCAUX, as well as their maximum and minimum values. Also check if alarm(s) are set.
Parameters
BaseAddressis the XPAR_<SYSMON_instance>_BASEADDRESS value from xparameters.h.
Returns
XST_SUCCESS
Note
None.

References XSysmonPsu_WriteReg.

Referenced by main().