sysmonpsu
Vitis Drivers API Documentation
|
This file contains a design example using the driver functions of the System Monitor driver.
This example here shows the usage of the driver/device in single channel interrupt mode to handle End of Conversion (EOC) and VCCINT alarm interrupts.
This code assumes that no Operating System is being used.
The value of the on-chip Vccint voltage is read from the device and then the alarm thresholds are set in such a manner that the alarm occurs.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 kvn 12/15/15 First release 02/15/16 Corrected order of Enabling / Disabling of interrupts. mn 03/08/18 Update code to run at higher frequency 2.9 cog 07/20/23 Added support for SDT flow
Functions | |
int | SysMonPsuSingleChannelIntrExample (XScuGic *XScuGicInstancePtr, XSysMonPsu *SysMonInstPtr, u32 SysMonDeviceId, u16 SysMonIntrId) |
This function runs a test on the System Monitor device using the driver APIs. More... | |
int | main (void) |
Main function that invokes the Single Channel Interrupt example. More... | |
int main | ( | void | ) |
Main function that invokes the Single Channel Interrupt example.
None. |
References SysMonPsuSingleChannelIntrExample().
int SysMonPsuSingleChannelIntrExample | ( | XScuGic * | XScuGicInstancePtr, |
XSysMonPsu * | SysMonInstPtr, | ||
u32 | SysMonDeviceId, | ||
u16 | SysMonIntrId | ||
) |
This function runs a test on the System Monitor device using the driver APIs.
The function does the following tasks:
XScuGicInstancePtr | is a pointer to the Interrupt Controller driver Instance. |
SysMonInstPtr | is a pointer to the XSysMon driver Instance. |
SysMonDeviceId | is the XPAR_<SYSMON_instance>_DEVICE_ID value from xparameters.h. |
SysMonIntrId | is XPAR_<SYSMON_instance>_VEC_ID value from xparameters_ps.h |
References XSysMonPsu_Config::BaseAddress, XSM_ATR_SUP1_LOWER, XSM_ATR_SUP1_UPPER, XSM_CH_SUPPLY1, XSM_SEQ_MODE_SINGCHAN, XSysMonPsu_CfgInitialize(), XSysMonPsu_GetAdcData(), XSysMonPsu_IntrClear(), XSysMonPsu_IntrDisable(), XSysMonPsu_IntrEnable(), XSysMonPsu_IntrGetStatus(), XSysMonPsu_LookupConfig(), XSysMonPsu_SelfTest(), XSysMonPsu_SetAlarmEnables(), XSysMonPsu_SetAlarmThreshold(), XSysMonPsu_SetSequencerMode(), and XSysMonPsu_SetSingleChParams().
Referenced by main().