sysmonpsu
Vitis Drivers API Documentation
xsysmonpsu_selftest.c File Reference

Functions

s32 XSysMonPsu_SelfTest (XSysMonPsu *InstancePtr)
 Run a self-test on the driver/device. More...
 

Function Documentation

s32 XSysMonPsu_SelfTest ( XSysMonPsu InstancePtr)

Run a self-test on the driver/device.

The test

  • Resets the device,
  • Writes a value into the Alarm Threshold register and reads it back for comparison.
  • Resets the device again.
Parameters
InstancePtris a pointer to the XSysMonPsu instance.
Returns
  • XST_SUCCESS if the value read from the Alarm Threshold register is the same as the value written.
  • XST_FAILURE Otherwise
Note
This is a destructive test in that resets of the device are performed. Refer to the device specification for the device status after the reset operation.

References XSysMonPsu::IsReady, XSM_ATR_SUP1_UPPER, XSysMonPsu_GetAlarmThreshold(), XSysMonPsu_Reset(), and XSysMonPsu_SetAlarmThreshold().

Referenced by SysMonPsuAMSExample(), SysMonPsuIntrExample(), SysMonPsuPolledPrintfExample(), and SysMonPsuSingleChannelIntrExample().