sysmonpsu
Vitis Drivers API Documentation
|
Data Structures | |
struct | XSysMonPsu_Config |
This typedef contains configuration information for a device. More... | |
struct | XSysMonPsu |
The XSysmonPsu driver instance data. More... | |
Macros | |
#define | XSysMonPsu_RawToTemperature_OnChip(AdcData) ((((float)(AdcData)/65536.0f)/0.00196342531f ) - 280.2309f) |
This macro converts System Monitor Raw Data to Temperature(centigrades) for On-Chip Sensors. More... | |
#define | XSysMonPsu_RawToTemperature_ExternalRef(AdcData) ((((float)(AdcData)/65536.0f)/0.00197008621f ) - 279.4266f) |
This macro converts System Monitor Raw Data to Temperature(centigrades) for external reference. More... | |
#define | XSysMonPsu_VpVnRawToVoltage(AdcData) ((((float)(AdcData))* (1.0f))/65536.0f) |
This macro converts System Monitor Raw Data to Voltage(volts) for VpVn supply. More... | |
#define | XSysMonPsu_RawToVoltage(AdcData) ((((float)(AdcData))* (3.0f))/65536.0f) |
This macro converts System Monitor Raw Data to Voltage(volts) other than VCCO_PSIO supply. More... | |
#define | XSysMonPsu_VccopsioRawToVoltage(AdcData) ((((float)(AdcData))* (6.0f))/65536.0f) |
This macro converts System Monitor Raw Data to Voltage(volts) for VCCO_PSIO supply. More... | |
#define | XSysMonPsu_TemperatureToRaw_OnChip(Temperature) ((s32)(((Temperature) + 280.2309f)*65536.0f*0.00196342531f)) |
This macro converts Temperature in centigrades to System Monitor Raw Data for On-Chip Sensors. More... | |
#define | XSysMonPsu_TemperatureToRaw_ExternalRef(Temperature) ((s32)(((Temperature) + 279.4266f)*65536.0f*0.00197008621f)) |
This macro converts Temperature in centigrades to System Monitor Raw Data for external reference. More... | |
#define | XSysMonPsu_VoltageToRaw(Voltage) ((s32)((Voltage)*65536.0f/3.0f)) |
This macro converts Voltage in Volts to System Monitor Raw Data other than VCCO_PSIO supply. More... | |
#define | XSysMonPsu_VccopsioVoltageToRaw(Voltage) ((s32)((Voltage)*65536.0f/6.0f)) |
This macro converts Voltage in Volts to System Monitor Raw Data for VCCO_PSIO supply. More... | |
Indexes for the different channels. | |
#define | XSM_CH_TEMP 0x0U |
On Chip Temperature. More... | |
#define | XSM_CH_SUPPLY1 0x1U |
SUPPLY1 VCC_PSINTLP. More... | |
#define | XSM_CH_SUPPLY2 0x2U |
SUPPLY2 VCC_PSINTFP. More... | |
#define | XSM_CH_VPVN 0x3U |
VP/VN Dedicated analog inputs. More... | |
#define | XSM_CH_VREFP 0x4U |
VREFP. More... | |
#define | XSM_CH_VREFN 0x5U |
VREFN. More... | |
#define | XSM_CH_SUPPLY3 0x6U |
SUPPLY3 VCC_PSAUX. More... | |
#define | XSM_CH_SUPPLY_CALIB 0x08U |
Supply Calib Data Reg. More... | |
#define | XSM_CH_ADC_CALIB 0x09U |
ADC Offset Channel Reg. More... | |
#define | XSM_CH_GAINERR_CALIB 0x0AU |
Gain Error Channel Reg. More... | |
#define | XSM_CH_SUPPLY4 0x0DU |
SUPPLY4 VCC_PSDDR_504. More... | |
#define | XSM_CH_SUPPLY5 0x0EU |
SUPPLY5 VCC_PSIO3_503. More... | |
#define | XSM_CH_SUPPLY6 0x0FU |
SUPPLY6 VCC_PSIO0_500. More... | |
#define | XSM_CH_AUX_MIN 16U |
Channel number for 1st Aux Channel. More... | |
#define | XSM_CH_AUX_MAX 31U |
Channel number for Last Aux channel. More... | |
#define | XSM_CH_SUPPLY7 32U |
SUPPLY7 VCC_PSIO1_501. More... | |
#define | XSM_CH_SUPPLY8 33U |
SUPPLY8 VCC_PSIO2_502. More... | |
#define | XSM_CH_SUPPLY9 34U |
SUPPLY9 PS_MGTRAVCC. More... | |
#define | XSM_CH_SUPPLY10 35U |
SUPPLY10 PS_MGTRAVTT. More... | |
#define | XSM_CH_VCCAMS 36U |
VCCAMS. More... | |
#define | XSM_CH_TEMP_REMTE 37U |
Temperature Remote. More... | |
#define | XSM_CH_VCC_PSLL0 48U |
VCC_PSLL0. More... | |
#define | XSM_CH_VCC_PSLL3 51U |
VCC_PSLL3. More... | |
#define | XSM_CH_VCCINT 54U |
VCCINT. More... | |
#define | XSM_CH_VCCBRAM 55U |
VCCBRAM. More... | |
#define | XSM_CH_VCCAUX 56U |
VCCAUX. More... | |
#define | XSM_CH_VCC_PSDDRPLL 57U |
VCC_PSDDRPLL. More... | |
#define | XSM_CH_DDRPHY_VREF 58U |
DDRPHY_VREF. More... | |
#define | XSM_CH_RESERVE1 63U |
PSGT_AT0. More... | |
Indexes for reading the Calibration Coefficient Data. | |
#define | XSM_CALIB_SUPPLY_OFFSET_COEFF 0U |
Supply Offset Calib Coefficient. More... | |
#define | XSM_CALIB_ADC_OFFSET_COEFF 1U |
ADC Offset Calib Coefficient. More... | |
#define | XSM_CALIB_GAIN_ERROR_COEFF 2U |
Gain Error Calib Coefficient. More... | |
Indexes for reading the Minimum/Maximum Measurement Data. | |
#define | XSM_MAX_TEMP 0U |
Maximum Temperature Data. More... | |
#define | XSM_MAX_SUPPLY1 1U |
Maximum SUPPLY1 Data. More... | |
#define | XSM_MAX_SUPPLY2 2U |
Maximum SUPPLY2 Data. More... | |
#define | XSM_MAX_SUPPLY3 3U |
Maximum SUPPLY3 Data. More... | |
#define | XSM_MIN_TEMP 4U |
Minimum Temperature Data. More... | |
#define | XSM_MIN_SUPPLY1 5U |
Minimum SUPPLY1 Data. More... | |
#define | XSM_MIN_SUPPLY2 6U |
Minimum SUPPLY2 Data. More... | |
#define | XSM_MIN_SUPPLY3 7U |
Minimum SUPPLY3 Data. More... | |
#define | XSM_MAX_SUPPLY4 8U |
Maximum SUPPLY4 Data. More... | |
#define | XSM_MAX_SUPPLY5 9U |
Maximum SUPPLY5 Data. More... | |
#define | XSM_MAX_SUPPLY6 0xAU |
Maximum SUPPLY6 Data. More... | |
#define | XSM_MIN_SUPPLY4 0xCU |
Minimum SUPPLY4 Data. More... | |
#define | XSM_MIN_SUPPLY5 0xDU |
Minimum SUPPLY5 Data. More... | |
#define | XSM_MIN_SUPPLY6 0xEU |
Minimum SUPPLY6 Data. More... | |
#define | XSM_MAX_SUPPLY7 0x80U |
Maximum SUPPLY7 Data. More... | |
#define | XSM_MAX_SUPPLY8 0x81U |
Maximum SUPPLY8 Data. More... | |
#define | XSM_MAX_SUPPLY9 0x82U |
Maximum SUPPLY9 Data. More... | |
#define | XSM_MAX_SUPPLY10 0x83U |
Maximum SUPPLY10 Data. More... | |
#define | XSM_MAX_VCCAMS 0x84U |
Maximum VCCAMS Data. More... | |
#define | XSM_MAX_TEMP_REMOTE 0x85U |
Maximum Remote Temperature Data. More... | |
#define | XSM_MIN_SUPPLY7 0x88U |
Minimum SUPPLY7 Data. More... | |
#define | XSM_MIN_SUPPLY8 0x89U |
Minimum SUPPLY8 Data. More... | |
#define | XSM_MIN_SUPPLY9 0x8AU |
Minimum SUPPLY9 Data. More... | |
#define | XSM_MIN_SUPPLY10 0x8BU |
Minimum SUPPLY10 Data. More... | |
#define | XSM_MIN_VCCAMS 0x8CU |
Minimum VCCAMS Data. More... | |
#define | XSM_MIN_TEMP_REMOTE 0x8DU |
Minimum Remote Temperature Data. More... | |
Averaging to be done for the channels. | |
#define | XSM_AVG_0_SAMPLES 0U |
No Averaging. More... | |
#define | XSM_AVG_16_SAMPLES 1U |
Average 16 samples. More... | |
#define | XSM_AVG_64_SAMPLES 2U |
Average 64 samples. More... | |
#define | XSM_AVG_256_SAMPLES 3U |
Average 256 samples. More... | |
Channel Sequencer Modes of operation. | |
#define | XSM_SEQ_MODE_SAFE 0U |
Default Safe Mode. More... | |
#define | XSM_SEQ_MODE_ONEPASS 1U |
Onepass through Sequencer. More... | |
#define | XSM_SEQ_MODE_CONTINPASS 2U |
Continuous Cycling Seqquencer. More... | |
#define | XSM_SEQ_MODE_SINGCHAN 3U |
Single channel - No Sequencing. More... | |
#define | XSM_SEQ_MODE_OYLMPUS 6U |
Olympus mode. More... | |
Clock Divisor values range. | |
#define | XSM_CLK_DIV_MIN 0U |
Minimum Clock Divisor value. More... | |
#define | XSM_CLK_DIV_MAX 255U |
Maximum Clock Divisor value. More... | |
Power down modes. | |
#define | XSM_PWR_MODE_NORMAL 0U |
Normal operation. More... | |
#define | XSM_PWR_MODE_PARTIAL_SLEEP 1U |
Partial sleep mode. More... | |
#define | XSM_PWR_MODE_SLEEP 3U |
Full sleep mode. More... | |
Alarm Threshold(Limit) Register (ATR) indexes. | |
#define | XSM_ATR_TEMP_UPPER 0U |
High user Temperature limit. More... | |
#define | XSM_ATR_SUP1_UPPER 1U |
Supply1 high voltage limit. More... | |
#define | XSM_ATR_SUP2_UPPER 2U |
Supply2 high voltage limit. More... | |
#define | XSM_ATR_OT_UPPER 3U |
Upper Over Temperature limit. More... | |
#define | XSM_ATR_TEMP_LOWER 4U |
Low user Temperature. More... | |
#define | XSM_ATR_SUP1_LOWER 5U |
Suuply1 low voltage limit. More... | |
#define | XSM_ATR_SUP2_LOWER 6U |
Supply2 low voltage limit. More... | |
#define | XSM_ATR_OT_LOWER 7U |
Lower Over Temperature limit. More... | |
#define | XSM_ATR_SUP3_UPPER 8U |
Supply3 high voltage limit. More... | |
#define | XSM_ATR_SUP4_UPPER 9U |
Supply4 high voltage limit. More... | |
#define | XSM_ATR_SUP5_UPPER 0xAU |
Supply5 high voltage limit. More... | |
#define | XSM_ATR_SUP6_UPPER 0xBU |
Supply6 high voltage limit. More... | |
#define | XSM_ATR_SUP3_LOWER 0xCU |
Supply3 low voltage limit. More... | |
#define | XSM_ATR_SUP4_LOWER 0xDU |
Supply4 low voltage limit. More... | |
#define | XSM_ATR_SUP5_LOWER 0xEU |
Supply5 low voltage limit. More... | |
#define | XSM_ATR_SUP6_LOWER 0xFU |
Supply6 low voltage limit. More... | |
#define | XSM_ATR_SUP7_UPPER 0x10U |
Supply7 high voltage limit. More... | |
#define | XSM_ATR_SUP8_UPPER 0x11U |
Supply8 high voltage limit. More... | |
#define | XSM_ATR_SUP9_UPPER 0x12U |
Supply9 high voltage limit. More... | |
#define | XSM_ATR_SUP10_UPPER 0x13U |
Supply10 high voltage limit. More... | |
#define | XSM_ATR_VCCAMS_UPPER 0x14U |
VCCAMS high voltage limit. More... | |
#define | XSM_ATR_TEMP_RMTE_UPPER 0x15U |
High remote Temperature limit. More... | |
#define | XSM_ATR_SUP7_LOWER 0x18U |
Supply7 low voltage limit. More... | |
#define | XSM_ATR_SUP8_LOWER 0x19U |
Supply8 low voltage limit. More... | |
#define | XSM_ATR_SUP9_LOWER 0x1AU |
Supply9 low voltage limit. More... | |
#define | XSM_ATR_SUP10_LOWER 0x1BU |
Supply10 low voltage limit. More... | |
#define | XSM_ATR_VCCAMS_LOWER 0x1CU |
VCCAMS low voltage limit. More... | |
#define | XSM_ATR_TEMP_RMTE_LOWER 0x1DU |
Low remote Temperature limit. More... | |
Alarm masks for channels in Configuration registers 1 | |
#define | XSM_CFR_ALM_SUPPLY13_MASK 0x200000 |
Alarm 13 - FPD Temperature. More... | |
#define | XSM_CFR_ALM_SUPPLY12_MASK 0x100000 |
Alarm 12 - VCCAMS/VCCADC. More... | |
#define | XSM_CFR_ALM_SUPPLY11_MASK 0x080000 |
Alarm 11 - SUPPLY10. More... | |
#define | XSM_CFR_ALM_SUPPLY10_MASK 0x040000 |
Alarm 10 - SUPPLY9. More... | |
#define | XSM_CFR_ALM_SUPPLY9_MASK 0x020000 |
Alarm 9 - SUPPLY8. More... | |
#define | XSM_CFR_ALM_SUPPLY8_MASK 0x010000 |
Alarm 8 - SUPPLY7. More... | |
#define | XSM_CFR_ALM_SUPPLY6_MASK 0x0800 |
Alarm 6 - SUPPLY6. More... | |
#define | XSM_CFR_ALM_SUPPLY5_MASK 0x0400 |
Alarm 5 - SUPPLY5. More... | |
#define | XSM_CFR_ALM_SUPPLY4_MASK 0x0200 |
Alarm 4 - SUPPLY4. More... | |
#define | XSM_CFR_ALM_SUPPLY3_MASK 0x0100 |
Alarm 3 - SUPPLY3. More... | |
#define | XSM_CFR_ALM_SUPPLY2_MASK 0x0008 |
Alarm 2 - SUPPLY2. More... | |
#define | XSM_CFR_ALM_SUPPLY1_MASK 0x0004 |
Alarm 1 - SUPPLY1. More... | |
#define | XSM_CFR_ALM_TEMP_MASK 0x0002 |
Alarm 0 - Temperature. More... | |
#define | XSM_CFR_ALM_OT_MASK 0x0001 |
Over Temperature Alarm. More... | |
Typedefs | |
typedef void(* | XSysMonPsu_Handler )(void *CallBackRef) |
This data type defines a handler that an application defines to communicate with interrupt system to retrieve state information about an application. More... | |
Functions | |
s32 | XSysMonPsu_CfgInitialize (XSysMonPsu *InstancePtr, XSysMonPsu_Config *ConfigPtr, u32 EffectiveAddr) |
This function initializes XSysMonPsu device/instance. More... | |
void | XSysMonPsu_Reset (XSysMonPsu *InstancePtr) |
This function resets the SystemMonitor. More... | |
u32 | XSysMonPsu_GetStatus (XSysMonPsu *InstancePtr, u32 SysmonBlk) |
This function reads the contents of the Status Register. More... | |
void | XSysMonPsu_StartAdcConversion (XSysMonPsu *InstancePtr) |
This function starts the ADC conversion in the Single Channel event driven sampling mode. More... | |
u16 | XSysMonPsu_GetAdcData (XSysMonPsu *InstancePtr, u8 Channel, u32 Block) |
Get the ADC converted data for the specified channel. More... | |
u16 | XSysMonPsu_GetCalibCoefficient (XSysMonPsu *InstancePtr, u8 CoeffType, u32 SysmonBlk) |
This function gets the calibration coefficient data for the specified parameter. More... | |
u16 | XSysMonPsu_GetMinMaxMeasurement (XSysMonPsu *InstancePtr, u8 MeasurementType, u32 SysmonBlk) |
This function reads the Minimum/Maximum measurement for one of the XSM_MIN_* or XSM_MAX_* constants defined in xsysmonpsu.h. More... | |
void | XSysMonPsu_SetAvg (XSysMonPsu *InstancePtr, u8 Average, u32 SysmonBlk) |
This function sets the number of samples of averaging that is to be done for all the channels in both the single channel mode and sequence mode of operations. More... | |
u8 | XSysMonPsu_GetAvg (XSysMonPsu *InstancePtr, u32 SysmonBlk) |
This function returns the number of samples of averaging configured for all the channels in the Configuration Register 0. More... | |
s32 | XSysMonPsu_SetSingleChParams (XSysMonPsu *InstancePtr, u8 Channel, u32 IncreaseAcqCycles, u32 IsEventMode, u32 IsDifferentialMode, u32 SysmonBlk) |
The function sets the given parameters in the Configuration Register 0 in the single channel mode. More... | |
void | XSysMonPsu_SetAlarmEnables (XSysMonPsu *InstancePtr, u32 AlmEnableMask, u32 SysmonBlk) |
This function enables the alarm outputs for the specified alarms in the Configuration Registers 1: More... | |
u32 | XSysMonPsu_GetAlarmEnables (XSysMonPsu *InstancePtr, u32 SysmonBlk) |
This function gets the status of the alarm output enables in the Configuration Register 1. More... | |
void | XSysMonPsu_SetSequencerMode (XSysMonPsu *InstancePtr, u8 SequencerMode, u32 SysmonBlk) |
This function sets the specified Channel Sequencer Mode in the Configuration Register 1 : More... | |
u8 | XSysMonPsu_GetSequencerMode (XSysMonPsu *InstancePtr, u32 SysmonBlk) |
This function gets the channel sequencer mode from the Configuration Register 1. More... | |
void | XSysMonPsu_SetSequencerEvent (XSysMonPsu *InstancePtr, u32 IsEventMode, u32 SysmonBlk) |
The function enables the Event mode or Continuous mode in the sequencer mode. More... | |
s32 | XSysMonPsu_GetSequencerEvent (XSysMonPsu *InstancePtr, u32 SysmonBlk) |
The function returns the mode of the sequencer. More... | |
void | XSysMonPsu_SetExtenalMux (XSysMonPsu *InstancePtr, u8 Channel, u32 SysmonBlk) |
The function enables the external mux and connects a channel to the mux. More... | |
u32 | XSysMonPsu_GetExtenalMux (XSysMonPsu *InstancePtr, u32 SysmonBlk) |
The function returns the external mux channel. More... | |
void | XSysMonPsu_SetAdcClkDivisor (XSysMonPsu *InstancePtr, u8 Divisor, u32 SysmonBlk) |
The function sets the frequency of the ADCCLK by configuring the DCLK to ADCCLK ratio in the Configuration Register #2. More... | |
u8 | XSysMonPsu_GetAdcClkDivisor (XSysMonPsu *InstancePtr, u32 SysmonBlk) |
The function gets the ADCCLK divisor from the Configuration Register 2. More... | |
u8 | XSysMonPsu_UpdateAdcClkDivisor (XSysMonPsu *InstancePtr, u32 SysmonBlk) |
The function update the ADCCLK divisor to the Configuration Register 2. More... | |
s32 | XSysMonPsu_SetSeqChEnables (XSysMonPsu *InstancePtr, u64 ChEnableMask, u32 SysmonBlk) |
This function enables the specified channels in the ADC Channel Selection Sequencer Registers. More... | |
u64 | XSysMonPsu_GetSeqAvgEnables (XSysMonPsu *InstancePtr, u32 SysmonBlk) |
This function returns the channels for which the averaging has been enabled in the ADC Channel Averaging Enables Sequencer Registers. More... | |
u64 | XSysMonPsu_GetSeqChEnables (XSysMonPsu *InstancePtr, u32 SysmonBlk) |
This function gets the channel enable bits status from the ADC Channel Selection Sequencer Registers. More... | |
s32 | XSysMonPsu_SetSeqAvgEnables (XSysMonPsu *InstancePtr, u64 AvgEnableChMask, u32 SysmonBlk) |
This function enables the averaging for the specified channels in the ADC Channel Averaging Enable Sequencer Registers. More... | |
s32 | XSysMonPsu_SetSeqInputMode (XSysMonPsu *InstancePtr, u64 InputModeChMask, u32 SysmonBlk) |
This function sets the Analog input mode for the specified channels in the ADC Channel Analog-Input Mode Sequencer Registers. More... | |
u64 | XSysMonPsu_GetSeqInputMode (XSysMonPsu *InstancePtr, u32 SysmonBlk) |
This function gets the Analog input mode for all the channels from the ADC Channel Analog-Input Mode Sequencer Registers. More... | |
s32 | XSysMonPsu_SetSeqAcqTime (XSysMonPsu *InstancePtr, u64 AcqCyclesChMask, u32 SysmonBlk) |
This function sets the number of Acquisition cycles in the ADC Channel Acquisition Time Sequencer Registers. More... | |
u64 | XSysMonPsu_GetSeqAcqTime (XSysMonPsu *InstancePtr, u32 SysmonBlk) |
This function gets the status of acquisition time from the ADC Channel Acquisition Time Sequencer Registers. More... | |
void | XSysMonPsu_SetAlarmThreshold (XSysMonPsu *InstancePtr, u8 AlarmThrReg, u16 Value, u32 SysmonBlk) |
This functions sets the contents of the given Alarm Threshold Register. More... | |
u16 | XSysMonPsu_GetAlarmThreshold (XSysMonPsu *InstancePtr, u8 AlarmThrReg, u32 SysmonBlk) |
This function returns the contents of the specified Alarm Threshold Register. More... | |
void | XSysMonPsu_SetPSAutoConversion (XSysMonPsu *InstancePtr) |
This function sets the conversion to be automatic for PS SysMon. More... | |
u32 | XSysMonPsu_GetMonitorStatus (XSysMonPsu *InstancePtr) |
This function gets the AMS monitor status. More... | |
void | XSysMonPsu_InitInstance (XSysMonPsu *InstancePtr, XSysMonPsu_Config *ConfigPtr) |
This function initializes XSysMonPsu device/instance. More... | |
void | XSysMonPsu_IntrEnable (XSysMonPsu *InstancePtr, u64 Mask) |
This function enables the specified interrupts in the device. More... | |
void | XSysMonPsu_IntrDisable (XSysMonPsu *InstancePtr, u64 Mask) |
This function disables the specified interrupts in the device. More... | |
u64 | XSysMonPsu_IntrGetEnabled (XSysMonPsu *InstancePtr) |
This function returns the enabled interrupts read from the Interrupt Enable Register (IER). More... | |
u64 | XSysMonPsu_IntrGetStatus (XSysMonPsu *InstancePtr) |
This function returns the interrupt status read from Interrupt Status Register(ISR). More... | |
void | XSysMonPsu_IntrClear (XSysMonPsu *InstancePtr, u64 Mask) |
This function clears the specified interrupts in the Interrupt Status Register (ISR). More... | |
s32 | XSysMonPsu_SelfTest (XSysMonPsu *InstancePtr) |
Run a self-test on the driver/device. More... | |
XSysMonPsu_Config * | XSysMonPsu_LookupConfig (u16 DeviceId) |
This function looks for the device configuration based on the unique device ID. More... | |
#define XSM_ATR_OT_LOWER 7U |
Lower Over Temperature limit.
#define XSM_ATR_OT_UPPER 3U |
Upper Over Temperature limit.
#define XSM_ATR_SUP10_LOWER 0x1BU |
Supply10 low voltage limit.
#define XSM_ATR_SUP10_UPPER 0x13U |
Supply10 high voltage limit.
#define XSM_ATR_SUP1_LOWER 5U |
Suuply1 low voltage limit.
Referenced by SysMonPsuIntrExample(), and SysMonPsuSingleChannelIntrExample().
#define XSM_ATR_SUP1_UPPER 1U |
Supply1 high voltage limit.
Referenced by SysMonPsuIntrExample(), SysMonPsuSingleChannelIntrExample(), and XSysMonPsu_SelfTest().
#define XSM_ATR_SUP2_LOWER 6U |
Supply2 low voltage limit.
#define XSM_ATR_SUP2_UPPER 2U |
Supply2 high voltage limit.
#define XSM_ATR_SUP3_LOWER 0xCU |
Supply3 low voltage limit.
Referenced by SysMonPsuIntrExample().
#define XSM_ATR_SUP3_UPPER 8U |
Supply3 high voltage limit.
Referenced by SysMonPsuIntrExample().
#define XSM_ATR_SUP4_LOWER 0xDU |
Supply4 low voltage limit.
#define XSM_ATR_SUP4_UPPER 9U |
Supply4 high voltage limit.
#define XSM_ATR_SUP5_LOWER 0xEU |
Supply5 low voltage limit.
#define XSM_ATR_SUP5_UPPER 0xAU |
Supply5 high voltage limit.
#define XSM_ATR_SUP6_LOWER 0xFU |
Supply6 low voltage limit.
#define XSM_ATR_SUP6_UPPER 0xBU |
Supply6 high voltage limit.
#define XSM_ATR_SUP7_LOWER 0x18U |
Supply7 low voltage limit.
Referenced by XSysMonPsu_GetAlarmThreshold(), and XSysMonPsu_SetAlarmThreshold().
#define XSM_ATR_SUP7_UPPER 0x10U |
Supply7 high voltage limit.
#define XSM_ATR_SUP8_LOWER 0x19U |
Supply8 low voltage limit.
#define XSM_ATR_SUP8_UPPER 0x11U |
Supply8 high voltage limit.
#define XSM_ATR_SUP9_LOWER 0x1AU |
Supply9 low voltage limit.
#define XSM_ATR_SUP9_UPPER 0x12U |
Supply9 high voltage limit.
#define XSM_ATR_TEMP_LOWER 4U |
Low user Temperature.
Referenced by SysMonPsuIntrExample().
#define XSM_ATR_TEMP_RMTE_LOWER 0x1DU |
Low remote Temperature limit.
Referenced by XSysMonPsu_GetAlarmThreshold(), and XSysMonPsu_SetAlarmThreshold().
#define XSM_ATR_TEMP_RMTE_UPPER 0x15U |
High remote Temperature limit.
Referenced by XSysMonPsu_GetAlarmThreshold(), and XSysMonPsu_SetAlarmThreshold().
#define XSM_ATR_TEMP_UPPER 0U |
High user Temperature limit.
Referenced by SysMonPsuIntrExample().
#define XSM_ATR_VCCAMS_LOWER 0x1CU |
VCCAMS low voltage limit.
#define XSM_ATR_VCCAMS_UPPER 0x14U |
VCCAMS high voltage limit.
#define XSM_AVG_0_SAMPLES 0U |
No Averaging.
#define XSM_AVG_16_SAMPLES 1U |
Average 16 samples.
Referenced by SysMonPsuIntrExample(), SysMonPsuLowLevelExample(), and SysMonPsuPolledPrintfExample().
#define XSM_AVG_256_SAMPLES 3U |
Average 256 samples.
Referenced by XSysMonPsu_SetAvg().
#define XSM_AVG_64_SAMPLES 2U |
Average 64 samples.
#define XSM_CALIB_ADC_OFFSET_COEFF 1U |
ADC Offset Calib Coefficient.
#define XSM_CALIB_GAIN_ERROR_COEFF 2U |
Gain Error Calib Coefficient.
Referenced by XSysMonPsu_GetCalibCoefficient().
#define XSM_CALIB_SUPPLY_OFFSET_COEFF 0U |
Supply Offset Calib Coefficient.
#define XSM_CFR_ALM_OT_MASK 0x0001 |
Over Temperature Alarm.
#define XSM_CFR_ALM_SUPPLY10_MASK 0x040000 |
Alarm 10 - SUPPLY9.
#define XSM_CFR_ALM_SUPPLY11_MASK 0x080000 |
Alarm 11 - SUPPLY10.
#define XSM_CFR_ALM_SUPPLY12_MASK 0x100000 |
Alarm 12 - VCCAMS/VCCADC.
#define XSM_CFR_ALM_SUPPLY13_MASK 0x200000 |
Alarm 13 - FPD Temperature.
#define XSM_CFR_ALM_SUPPLY1_MASK 0x0004 |
Alarm 1 - SUPPLY1.
Referenced by SysMonPsuIntrExample().
#define XSM_CFR_ALM_SUPPLY2_MASK 0x0008 |
Alarm 2 - SUPPLY2.
#define XSM_CFR_ALM_SUPPLY3_MASK 0x0100 |
Alarm 3 - SUPPLY3.
Referenced by SysMonPsuIntrExample().
#define XSM_CFR_ALM_SUPPLY4_MASK 0x0200 |
Alarm 4 - SUPPLY4.
#define XSM_CFR_ALM_SUPPLY5_MASK 0x0400 |
Alarm 5 - SUPPLY5.
#define XSM_CFR_ALM_SUPPLY6_MASK 0x0800 |
Alarm 6 - SUPPLY6.
#define XSM_CFR_ALM_SUPPLY8_MASK 0x010000 |
Alarm 8 - SUPPLY7.
#define XSM_CFR_ALM_SUPPLY9_MASK 0x020000 |
Alarm 9 - SUPPLY8.
#define XSM_CFR_ALM_TEMP_MASK 0x0002 |
Alarm 0 - Temperature.
Referenced by SysMonPsuIntrExample().
#define XSM_CH_ADC_CALIB 0x09U |
ADC Offset Channel Reg.
#define XSM_CH_AUX_MAX 31U |
Channel number for Last Aux channel.
Referenced by XSysMonPsu_GetAdcData(), XSysMonPsu_SetExtenalMux(), and XSysMonPsu_SetSingleChParams().
#define XSM_CH_AUX_MIN 16U |
Channel number for 1st Aux Channel.
Referenced by XSysMonPsu_SetExtenalMux(), and XSysMonPsu_SetSingleChParams().
#define XSM_CH_DDRPHY_VREF 58U |
DDRPHY_VREF.
Referenced by SysMonPsuAMSExample().
#define XSM_CH_GAINERR_CALIB 0x0AU |
Gain Error Channel Reg.
Referenced by XSysMonPsu_GetAdcData(), and XSysMonPsu_SetSingleChParams().
#define XSM_CH_RESERVE1 63U |
PSGT_AT0.
Referenced by SysMonPsuAMSExample(), XSysMonPsu_GetAdcData(), and XSysMonPsu_SetSingleChParams().
#define XSM_CH_SUPPLY1 0x1U |
SUPPLY1 VCC_PSINTLP.
Referenced by SysMonPsuIntrExample(), SysMonPsuPolledPrintfExample(), and SysMonPsuSingleChannelIntrExample().
#define XSM_CH_SUPPLY10 35U |
SUPPLY10 PS_MGTRAVTT.
#define XSM_CH_SUPPLY2 0x2U |
SUPPLY2 VCC_PSINTFP.
#define XSM_CH_SUPPLY3 0x6U |
SUPPLY3 VCC_PSAUX.
Referenced by SysMonPsuIntrExample(), SysMonPsuPolledPrintfExample(), XSysMonPsu_GetAdcData(), and XSysMonPsu_SetSingleChParams().
#define XSM_CH_SUPPLY4 0x0DU |
SUPPLY4 VCC_PSDDR_504.
Referenced by XSysMonPsu_GetAdcData(), and XSysMonPsu_SetSingleChParams().
#define XSM_CH_SUPPLY5 0x0EU |
SUPPLY5 VCC_PSIO3_503.
#define XSM_CH_SUPPLY6 0x0FU |
SUPPLY6 VCC_PSIO0_500.
#define XSM_CH_SUPPLY7 32U |
SUPPLY7 VCC_PSIO1_501.
Referenced by XSysMonPsu_GetAdcData().
#define XSM_CH_SUPPLY8 33U |
SUPPLY8 VCC_PSIO2_502.
#define XSM_CH_SUPPLY9 34U |
SUPPLY9 PS_MGTRAVCC.
#define XSM_CH_SUPPLY_CALIB 0x08U |
Supply Calib Data Reg.
Referenced by XSysMonPsu_GetAdcData(), and XSysMonPsu_SetSingleChParams().
#define XSM_CH_TEMP 0x0U |
On Chip Temperature.
Referenced by SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
#define XSM_CH_TEMP_REMTE 37U |
Temperature Remote.
Referenced by XSysMonPsu_GetAdcData(), and XSysMonPsu_SetSingleChParams().
#define XSM_CH_VCC_PSDDRPLL 57U |
VCC_PSDDRPLL.
Referenced by SysMonPsuAMSExample().
#define XSM_CH_VCC_PSLL0 48U |
VCC_PSLL0.
Referenced by SysMonPsuAMSExample(), XSysMonPsu_GetAdcData(), and XSysMonPsu_SetSingleChParams().
#define XSM_CH_VCC_PSLL3 51U |
VCC_PSLL3.
Referenced by SysMonPsuAMSExample().
#define XSM_CH_VCCAMS 36U |
VCCAMS.
#define XSM_CH_VCCAUX 56U |
VCCAUX.
Referenced by SysMonPsuAMSExample().
#define XSM_CH_VCCBRAM 55U |
VCCBRAM.
Referenced by SysMonPsuAMSExample().
#define XSM_CH_VCCINT 54U |
VCCINT.
Referenced by SysMonPsuAMSExample().
#define XSM_CH_VPVN 0x3U |
VP/VN Dedicated analog inputs.
Referenced by XSysMonPsu_SetSingleChParams().
#define XSM_CH_VREFN 0x5U |
VREFN.
Referenced by XSysMonPsu_SetExtenalMux().
#define XSM_CH_VREFP 0x4U |
VREFP.
#define XSM_CLK_DIV_MAX 255U |
Maximum Clock Divisor value.
#define XSM_CLK_DIV_MIN 0U |
Minimum Clock Divisor value.
#define XSM_MAX_SUPPLY1 1U |
Maximum SUPPLY1 Data.
Referenced by SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
#define XSM_MAX_SUPPLY10 0x83U |
Maximum SUPPLY10 Data.
#define XSM_MAX_SUPPLY2 2U |
Maximum SUPPLY2 Data.
#define XSM_MAX_SUPPLY3 3U |
Maximum SUPPLY3 Data.
Referenced by SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
#define XSM_MAX_SUPPLY4 8U |
Maximum SUPPLY4 Data.
#define XSM_MAX_SUPPLY5 9U |
Maximum SUPPLY5 Data.
#define XSM_MAX_SUPPLY6 0xAU |
Maximum SUPPLY6 Data.
Referenced by XSysMonPsu_GetMinMaxMeasurement().
#define XSM_MAX_SUPPLY7 0x80U |
Maximum SUPPLY7 Data.
Referenced by XSysMonPsu_GetMinMaxMeasurement().
#define XSM_MAX_SUPPLY8 0x81U |
Maximum SUPPLY8 Data.
#define XSM_MAX_SUPPLY9 0x82U |
Maximum SUPPLY9 Data.
#define XSM_MAX_TEMP 0U |
Maximum Temperature Data.
Referenced by SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
#define XSM_MAX_TEMP_REMOTE 0x85U |
Maximum Remote Temperature Data.
Referenced by XSysMonPsu_GetMinMaxMeasurement().
#define XSM_MAX_VCCAMS 0x84U |
Maximum VCCAMS Data.
#define XSM_MIN_SUPPLY1 5U |
Minimum SUPPLY1 Data.
Referenced by SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
#define XSM_MIN_SUPPLY10 0x8BU |
Minimum SUPPLY10 Data.
#define XSM_MIN_SUPPLY2 6U |
Minimum SUPPLY2 Data.
#define XSM_MIN_SUPPLY3 7U |
Minimum SUPPLY3 Data.
Referenced by SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
#define XSM_MIN_SUPPLY4 0xCU |
Minimum SUPPLY4 Data.
Referenced by XSysMonPsu_GetMinMaxMeasurement().
#define XSM_MIN_SUPPLY5 0xDU |
Minimum SUPPLY5 Data.
#define XSM_MIN_SUPPLY6 0xEU |
Minimum SUPPLY6 Data.
Referenced by XSysMonPsu_GetMinMaxMeasurement().
#define XSM_MIN_SUPPLY7 0x88U |
Minimum SUPPLY7 Data.
Referenced by XSysMonPsu_GetMinMaxMeasurement().
#define XSM_MIN_SUPPLY8 0x89U |
Minimum SUPPLY8 Data.
#define XSM_MIN_SUPPLY9 0x8AU |
Minimum SUPPLY9 Data.
#define XSM_MIN_TEMP 4U |
Minimum Temperature Data.
Referenced by SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
#define XSM_MIN_TEMP_REMOTE 0x8DU |
Minimum Remote Temperature Data.
Referenced by XSysMonPsu_GetMinMaxMeasurement().
#define XSM_MIN_VCCAMS 0x8CU |
Minimum VCCAMS Data.
#define XSM_PWR_MODE_NORMAL 0U |
Normal operation.
#define XSM_PWR_MODE_PARTIAL_SLEEP 1U |
Partial sleep mode.
#define XSM_PWR_MODE_SLEEP 3U |
Full sleep mode.
#define XSM_SEQ_MODE_CONTINPASS 2U |
Continuous Cycling Seqquencer.
Referenced by SysMonPsuIntrExample(), SysMonPsuLowLevelExample(), and SysMonPsuPolledPrintfExample().
#define XSM_SEQ_MODE_ONEPASS 1U |
Onepass through Sequencer.
#define XSM_SEQ_MODE_OYLMPUS 6U |
Olympus mode.
Referenced by XSysMonPsu_SetSequencerMode().
#define XSM_SEQ_MODE_SAFE 0U |
Default Safe Mode.
Referenced by SysMonPsuIntrExample(), SysMonPsuLowLevelExample(), SysMonPsuPolledPrintfExample(), XSysMonPsu_SetSeqAcqTime(), XSysMonPsu_SetSeqAvgEnables(), XSysMonPsu_SetSeqChEnables(), and XSysMonPsu_SetSeqInputMode().
#define XSM_SEQ_MODE_SINGCHAN 3U |
Single channel - No Sequencing.
Referenced by SysMonPsuAMSExample(), SysMonPsuSingleChannelIntrExample(), XSysMonPsu_SetSequencerMode(), and XSysMonPsu_SetSingleChParams().
#define XSysMonPsu_RawToTemperature_ExternalRef | ( | AdcData | ) | ((((float)(AdcData)/65536.0f)/0.00197008621f ) - 279.4266f) |
This macro converts System Monitor Raw Data to Temperature(centigrades) for external reference.
AdcData | is the SysMon Raw ADC Data. |
#define XSysMonPsu_RawToTemperature_OnChip | ( | AdcData | ) | ((((float)(AdcData)/65536.0f)/0.00196342531f ) - 280.2309f) |
This macro converts System Monitor Raw Data to Temperature(centigrades) for On-Chip Sensors.
AdcData | is the SysMon Raw ADC Data. |
Referenced by SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
#define XSysMonPsu_RawToVoltage | ( | AdcData | ) | ((((float)(AdcData))* (3.0f))/65536.0f) |
This macro converts System Monitor Raw Data to Voltage(volts) other than VCCO_PSIO supply.
AdcData | is the System Monitor ADC Raw Data. |
Referenced by SysMonPsuAMSExample(), SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
#define XSysMonPsu_TemperatureToRaw_ExternalRef | ( | Temperature | ) | ((s32)(((Temperature) + 279.4266f)*65536.0f*0.00197008621f)) |
This macro converts Temperature in centigrades to System Monitor Raw Data for external reference.
Temperature | is the Temperature in centigrades to be converted to System Monitor ADC Raw Data. |
#define XSysMonPsu_TemperatureToRaw_OnChip | ( | Temperature | ) | ((s32)(((Temperature) + 280.2309f)*65536.0f*0.00196342531f)) |
This macro converts Temperature in centigrades to System Monitor Raw Data for On-Chip Sensors.
Temperature | is the Temperature in centigrades to be converted to System Monitor ADC Raw Data. |
Referenced by SysMonPsuIntrExample().
#define XSysMonPsu_VccopsioRawToVoltage | ( | AdcData | ) | ((((float)(AdcData))* (6.0f))/65536.0f) |
This macro converts System Monitor Raw Data to Voltage(volts) for VCCO_PSIO supply.
AdcData | is the System Monitor ADC Raw Data. |
#define XSysMonPsu_VccopsioVoltageToRaw | ( | Voltage | ) | ((s32)((Voltage)*65536.0f/6.0f)) |
This macro converts Voltage in Volts to System Monitor Raw Data for VCCO_PSIO supply.
Voltage | is the Voltage in volts to be converted to System Monitor/ADC Raw Data. |
#define XSysMonPsu_VoltageToRaw | ( | Voltage | ) | ((s32)((Voltage)*65536.0f/3.0f)) |
This macro converts Voltage in Volts to System Monitor Raw Data other than VCCO_PSIO supply.
Voltage | is the Voltage in volts to be converted to System Monitor/ADC Raw Data. |
Referenced by SysMonPsuIntrExample().
#define XSysMonPsu_VpVnRawToVoltage | ( | AdcData | ) | ((((float)(AdcData))* (1.0f))/65536.0f) |
This macro converts System Monitor Raw Data to Voltage(volts) for VpVn supply.
AdcData | is the System Monitor ADC Raw Data. |
typedef void(* XSysMonPsu_Handler)(void *CallBackRef) |
This data type defines a handler that an application defines to communicate with interrupt system to retrieve state information about an application.
CallBackRef | is a callback reference passed in by the upper layer when setting the handler, and is passed back to the upper layer when the handler is called. It is used to find the device driver instance. |
s32 XSysMonPsu_CfgInitialize | ( | XSysMonPsu * | InstancePtr, |
XSysMonPsu_Config * | ConfigPtr, | ||
u32 | EffectiveAddr | ||
) |
This function initializes XSysMonPsu device/instance.
This function must be called prior to using the System Monitor device.
InstancePtr | is a pointer to the XSysMonPsu instance. |
ConfigPtr | points to the XSysMonPsu device configuration structure. |
EffectiveAddr | is the device base address in the virtual memory address space. If the address translation is not used then the physical address is passed. Unexpected errors may occur if the address mapping is changed after this function is invoked. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu_Config::DeviceId, XSysMonPsu_Config::InputClockMHz, XSysMonPsu::IsPlAccessibleByPs, XSysMonPsu::IsReady, XSysMonPsu_IntrClear(), XSysMonPsu_IntrGetStatus(), XSYSMONPSU_PL_SYSMON_CSTS_OFFSET, XSYSMONPSU_PS_SYSMON_CSTS_OFFSET, XSysmonPsu_ReadReg, XSysMonPsu_Reset(), and XSysMonPsu_UpdateAdcClkDivisor().
Referenced by SysMonPsuAMSExample(), SysMonPsuIntrExample(), SysMonPsuPolledPrintfExample(), and SysMonPsuSingleChannelIntrExample().
u8 XSysMonPsu_GetAdcClkDivisor | ( | XSysMonPsu * | InstancePtr, |
u32 | SysmonBlk | ||
) |
The function gets the ADCCLK divisor from the Configuration Register 2.
InstancePtr | is a pointer to the XSysMon instance. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_CFG_REG2_OFFSET, and XSysmonPsu_ReadReg.
u16 XSysMonPsu_GetAdcData | ( | XSysMonPsu * | InstancePtr, |
u8 | Channel, | ||
u32 | Block | ||
) |
Get the ADC converted data for the specified channel.
InstancePtr | is a pointer to the XSysMonPsu instance. |
Channel | is the channel number. Use the XSM_CH_* defined in the file xsysmonpsu.h. The valid channels for PS / PL SysMon are 0 - 6, 8 - 10 and 13 - 37. For AMS, 38 - 53 channels are valid. |
Block | is the value that tells whether it is for PS Sysmon block or PL Sysmon block or the AMS controller register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_CH_AUX_MAX, XSM_CH_GAINERR_CALIB, XSM_CH_RESERVE1, XSM_CH_SUPPLY3, XSM_CH_SUPPLY4, XSM_CH_SUPPLY7, XSM_CH_SUPPLY_CALIB, XSM_CH_TEMP_REMTE, XSM_CH_VCC_PSLL0, and XSysmonPsu_ReadReg.
Referenced by SysMonPsuAMSExample(), SysMonPsuIntrExample(), SysMonPsuPolledPrintfExample(), and SysMonPsuSingleChannelIntrExample().
u32 XSysMonPsu_GetAlarmEnables | ( | XSysMonPsu * | InstancePtr, |
u32 | SysmonBlk | ||
) |
This function gets the status of the alarm output enables in the Configuration Register 1.
InstancePtr | is a pointer to the XSysMonPsu instance. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
Bit positions of 1 indicate that the alarm output is enabled. Bit positions of 0 indicate that the alarm output is disabled.
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_CFG_REG1_OFFSET, and XSysmonPsu_ReadReg.
u16 XSysMonPsu_GetAlarmThreshold | ( | XSysMonPsu * | InstancePtr, |
u8 | AlarmThrReg, | ||
u32 | SysmonBlk | ||
) |
This function returns the contents of the specified Alarm Threshold Register.
InstancePtr | is a pointer to the XSysMonPsu instance. |
AlarmThrReg | is the index of an Alarm Threshold Register to be read. Use XSM_ATR_* constants defined in xsysmonpsu.h to specify the index. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_ATR_SUP7_LOWER, XSM_ATR_TEMP_RMTE_LOWER, XSM_ATR_TEMP_RMTE_UPPER, XSYSMONPSU_ALRM_TEMP_UPR_OFFSET, and XSysmonPsu_ReadReg.
Referenced by SysMonPsuIntrExample(), and XSysMonPsu_SelfTest().
u8 XSysMonPsu_GetAvg | ( | XSysMonPsu * | InstancePtr, |
u32 | SysmonBlk | ||
) |
This function returns the number of samples of averaging configured for all the channels in the Configuration Register 0.
InstancePtr | is a pointer to the XSysMonPsu instance. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_CFG_REG0_OFFSET, and XSysmonPsu_ReadReg.
u16 XSysMonPsu_GetCalibCoefficient | ( | XSysMonPsu * | InstancePtr, |
u8 | CoeffType, | ||
u32 | SysmonBlk | ||
) |
This function gets the calibration coefficient data for the specified parameter.
InstancePtr | is a pointer to the XSysMonPsu instance. |
CoeffType | specifies the calibration coefficient to be read. Use XSM_CALIB_* constants defined in xsysmonpsu.h to specify the calibration coefficient to be read. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_CALIB_GAIN_ERROR_COEFF, XSYSMONPSU_CAL_SUP_OFF_OFFSET, and XSysmonPsu_ReadReg.
u32 XSysMonPsu_GetExtenalMux | ( | XSysMonPsu * | InstancePtr, |
u32 | SysmonBlk | ||
) |
The function returns the external mux channel.
InstancePtr | is a pointer to the XSysMonPsu instance. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_CFG_REG0_OFFSET, and XSysmonPsu_ReadReg.
u16 XSysMonPsu_GetMinMaxMeasurement | ( | XSysMonPsu * | InstancePtr, |
u8 | MeasurementType, | ||
u32 | SysmonBlk | ||
) |
This function reads the Minimum/Maximum measurement for one of the XSM_MIN_* or XSM_MAX_* constants defined in xsysmonpsu.h.
InstancePtr | is a pointer to the XSysMonPsu instance. |
MeasurementType | specifies the parameter for which the Minimum/Maximum measurement has to be read. Use XSM_MAX_* and XSM_MIN_* constants defined in xsysmonpsu.h to specify the data to be read. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_MAX_SUPPLY6, XSM_MAX_SUPPLY7, XSM_MAX_TEMP_REMOTE, XSM_MIN_SUPPLY4, XSM_MIN_SUPPLY6, XSM_MIN_SUPPLY7, XSM_MIN_TEMP_REMOTE, and XSysmonPsu_ReadReg.
Referenced by SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
u32 XSysMonPsu_GetMonitorStatus | ( | XSysMonPsu * | InstancePtr | ) |
This function gets the AMS monitor status.
InstancePtr | is a pointer to the XSysMonPsu instance. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_MON_STS_OFFSET, and XSysmonPsu_ReadReg.
u64 XSysMonPsu_GetSeqAcqTime | ( | XSysMonPsu * | InstancePtr, |
u32 | SysmonBlk | ||
) |
This function gets the status of acquisition time from the ADC Channel Acquisition Time Sequencer Registers.
InstancePtr | is a pointer to the XSysMonPsu instance. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSysmonPsu_ReadReg, XSYSMONPSU_SEQ_ACQ0_OFFSET, XSYSMONPSU_SEQ_ACQ1_OFFSET, and XSYSMONPSU_SEQ_ACQ2_OFFSET.
u64 XSysMonPsu_GetSeqAvgEnables | ( | XSysMonPsu * | InstancePtr, |
u32 | SysmonBlk | ||
) |
This function returns the channels for which the averaging has been enabled in the ADC Channel Averaging Enables Sequencer Registers.
InstancePtr | is a pointer to the XSysMonPsu instance. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSysmonPsu_ReadReg, XSYSMONPSU_SEQ_AVERAGE0_OFFSET, and XSYSMONPSU_SEQ_AVERAGE1_OFFSET.
u64 XSysMonPsu_GetSeqChEnables | ( | XSysMonPsu * | InstancePtr, |
u32 | SysmonBlk | ||
) |
This function gets the channel enable bits status from the ADC Channel Selection Sequencer Registers.
InstancePtr | is a pointer to the XSysMonPsu instance. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSysmonPsu_ReadReg, XSYSMONPSU_SEQ_CH0_OFFSET, and XSYSMONPSU_SEQ_CH1_OFFSET.
u64 XSysMonPsu_GetSeqInputMode | ( | XSysMonPsu * | InstancePtr, |
u32 | SysmonBlk | ||
) |
This function gets the Analog input mode for all the channels from the ADC Channel Analog-Input Mode Sequencer Registers.
InstancePtr | is a pointer to the XSysMonPsu instance. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSysmonPsu_ReadReg, XSYSMONPSU_SEQ_INPUT_MDE0_OFFSET, and XSYSMONPSU_SEQ_INPUT_MDE1_OFFSET.
s32 XSysMonPsu_GetSequencerEvent | ( | XSysMonPsu * | InstancePtr, |
u32 | SysmonBlk | ||
) |
The function returns the mode of the sequencer.
InstancePtr | is a pointer to the XSysMonPsu instance. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_CFG_REG0_OFFSET, and XSysmonPsu_ReadReg.
u8 XSysMonPsu_GetSequencerMode | ( | XSysMonPsu * | InstancePtr, |
u32 | SysmonBlk | ||
) |
This function gets the channel sequencer mode from the Configuration Register 1.
InstancePtr | is a pointer to the XSysMonPsu instance. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_CFG_REG1_OFFSET, and XSysmonPsu_ReadReg.
Referenced by XSysMonPsu_SetSeqAcqTime(), XSysMonPsu_SetSeqAvgEnables(), XSysMonPsu_SetSeqChEnables(), XSysMonPsu_SetSeqInputMode(), and XSysMonPsu_SetSingleChParams().
u32 XSysMonPsu_GetStatus | ( | XSysMonPsu * | InstancePtr, |
u32 | SysmonBlk | ||
) |
This function reads the contents of the Status Register.
InstancePtr | is a pointer to the XSysMonPsu instance. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_MON_STS_OFFSET, and XSysmonPsu_ReadReg.
void XSysMonPsu_InitInstance | ( | XSysMonPsu * | InstancePtr, |
XSysMonPsu_Config * | ConfigPtr | ||
) |
This function initializes XSysMonPsu device/instance.
InstancePtr | is a pointer to the XSysMonPsu instance. |
ConfigPtr | points to the XSysMonPsu device configuration structure. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu_Config::DeviceId, and XSysMonPsu::IsReady.
void XSysMonPsu_IntrClear | ( | XSysMonPsu * | InstancePtr, |
u64 | Mask | ||
) |
This function clears the specified interrupts in the Interrupt Status Register (ISR).
InstancePtr | is a pointer to the XSysMonPsu instance. |
Mask | is the 64 bit-mask of the interrupts to be cleared. Bit positions of 1 will be cleared. Bit positions of 0 will not change the previous interrupt status. This mask is formed by OR'ing the XSYSMONPSU_ISR_0_* and XSYSMONPSU_ISR_1_* bits which are defined in xsysmonpsu_hw.h. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_ISR_0_OFFSET, XSYSMONPSU_ISR_1_OFFSET, XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
Referenced by SysMonPsuAMSExample(), SysMonPsuIntrExample(), SysMonPsuPolledPrintfExample(), SysMonPsuSingleChannelIntrExample(), and XSysMonPsu_CfgInitialize().
void XSysMonPsu_IntrDisable | ( | XSysMonPsu * | InstancePtr, |
u64 | Mask | ||
) |
This function disables the specified interrupts in the device.
InstancePtr | is a pointer to the XSysMonPsu instance. |
Mask | is the 64 bit-mask of the interrupts to be disabled. Bit positions of 1 will be disabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XSYSMONPSU_IDR_0_* and XSYSMONPSU_IDR_1_* bits defined in xsysmonpsu_hw.h. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_IDR_0_OFFSET, XSYSMONPSU_IDR_1_OFFSET, XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
Referenced by SysMonPsuSingleChannelIntrExample().
void XSysMonPsu_IntrEnable | ( | XSysMonPsu * | InstancePtr, |
u64 | Mask | ||
) |
This function enables the specified interrupts in the device.
InstancePtr | is a pointer to the XSysMonPsu instance. |
Mask | is the 64 bit-mask of the interrupts to be enabled. Bit positions of 1 will be enabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XSYSMONPSU_IER_0_* and XSYSMONPSU_IER_1_* bits defined in xsysmonpsu_hw.h. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_IER_0_OFFSET, XSYSMONPSU_IER_1_OFFSET, XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
Referenced by SysMonPsuIntrExample(), and SysMonPsuSingleChannelIntrExample().
u64 XSysMonPsu_IntrGetEnabled | ( | XSysMonPsu * | InstancePtr | ) |
This function returns the enabled interrupts read from the Interrupt Enable Register (IER).
Use the XSYSMONPSU_IER_0_* and XSYSMONPSU_IER_1_* constants defined in xsysmonpsu_hw.h to interpret the returned value.
InstancePtr | is a pointer to the XSysMonPsu instance. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_IMR_0_OFFSET, XSYSMONPSU_IMR_1_OFFSET, and XSysmonPsu_ReadReg.
u64 XSysMonPsu_IntrGetStatus | ( | XSysMonPsu * | InstancePtr | ) |
This function returns the interrupt status read from Interrupt Status Register(ISR).
Use the XSYSMONPSU_ISR_0_* and XSYSMONPSU_ISR_1_ constants defined in xsysmonpsu_hw.h to interpret the returned value.
InstancePtr | is a pointer to the XSysMonPsu instance. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_ISR_0_OFFSET, XSYSMONPSU_ISR_1_OFFSET, and XSysmonPsu_ReadReg.
Referenced by SysMonPsuAMSExample(), SysMonPsuIntrExample(), SysMonPsuPolledPrintfExample(), SysMonPsuSingleChannelIntrExample(), and XSysMonPsu_CfgInitialize().
XSysMonPsu_Config* XSysMonPsu_LookupConfig | ( | u16 | DeviceId | ) |
This function looks for the device configuration based on the unique device ID.
The table XSysmonPsu_ConfigTable[] contains the configuration information for each device in the system.
DeviceId | is the unique device ID of the device being looked up. |
Referenced by SysMonPsuAMSExample(), SysMonPsuIntrExample(), SysMonPsuPolledPrintfExample(), and SysMonPsuSingleChannelIntrExample().
void XSysMonPsu_Reset | ( | XSysMonPsu * | InstancePtr | ) |
This function resets the SystemMonitor.
InstancePtr | is a pointer to the XSysMonPsu instance. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysmonPsu_ReadReg, XSYSMONPSU_VP_VN_OFFSET, and XSysmonPsu_WriteReg.
Referenced by XSysMonPsu_CfgInitialize(), and XSysMonPsu_SelfTest().
s32 XSysMonPsu_SelfTest | ( | XSysMonPsu * | InstancePtr | ) |
Run a self-test on the driver/device.
The test
InstancePtr | is a pointer to the XSysMonPsu instance. |
References XSysMonPsu::IsReady, XSM_ATR_SUP1_UPPER, XSysMonPsu_GetAlarmThreshold(), XSysMonPsu_Reset(), and XSysMonPsu_SetAlarmThreshold().
Referenced by SysMonPsuAMSExample(), SysMonPsuIntrExample(), SysMonPsuPolledPrintfExample(), and SysMonPsuSingleChannelIntrExample().
void XSysMonPsu_SetAdcClkDivisor | ( | XSysMonPsu * | InstancePtr, |
u8 | Divisor, | ||
u32 | SysmonBlk | ||
) |
The function sets the frequency of the ADCCLK by configuring the DCLK to ADCCLK ratio in the Configuration Register #2.
InstancePtr | is a pointer to the XSysMonPsu instance. |
Divisor | is clock divisor used to derive ADCCLK from DCLK. Valid values of the divisor are PS:
|
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_CFG_REG2_OFFSET, XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
void XSysMonPsu_SetAlarmEnables | ( | XSysMonPsu * | InstancePtr, |
u32 | AlmEnableMask, | ||
u32 | SysmonBlk | ||
) |
This function enables the alarm outputs for the specified alarms in the Configuration Registers 1:
- OT for Over Temperature (XSYSMONPSU_CFR_REG1_ALRM_OT_MASK) - ALM0 for On board Temperature (XSYSMONPSU_CFR_REG1_ALRM_TEMP_MASK) - ALM1 for SUPPLY1 (XSYSMONPSU_CFR_REG1_ALRM_SUPPLY1_MASK) - ALM2 for SUPPLY2 (XSYSMONPSU_CFR_REG1_ALRM_SUPPLY2_MASK) - ALM3 for SUPPLY3 (XSYSMONPSU_CFR_REG1_ALRM_SUPPLY3_MASK) - ALM4 for SUPPLY4 (XSYSMONPSU_CFR_REG1_ALRM__SUPPLY4_MASK) - ALM5 for SUPPLY5 (XSYSMONPSU_CFR_REG1_ALRM_SUPPLY5_MASK) - ALM6 for SUPPLY6 (XSYSMONPSU_CFR_REG1_ALRM_SUPPLY6_MASK)
InstancePtr | is a pointer to the XSysMonPsu instance. |
AlmEnableMask | is the bit-mask of the alarm outputs to be enabled in the Configuration Registers 1 and 3. Bit positions of 1 will be enabled. Bit positions of 0 will be disabled. This mask is formed by OR'ing XSYSMONPSU_CFR_REG1_ALRM_*_MASK masks defined in xsysmonpsu.h, but XSM_CFR_ALM_SUPPLY8_MASK to XSM_CFR_ALM_SUPPLY13_MASK are applicable only for PS. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_CFG_REG1_OFFSET, XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
Referenced by SysMonPsuIntrExample(), SysMonPsuPolledPrintfExample(), and SysMonPsuSingleChannelIntrExample().
void XSysMonPsu_SetAlarmThreshold | ( | XSysMonPsu * | InstancePtr, |
u8 | AlarmThrReg, | ||
u16 | Value, | ||
u32 | SysmonBlk | ||
) |
This functions sets the contents of the given Alarm Threshold Register.
InstancePtr | is a pointer to the XSysMonPsu instance. |
AlarmThrReg | is the index of an Alarm Threshold Register to be set. Use XSM_ATR_* constants defined in xsysmonpsu.h to specify the index. |
Value | is the 16-bit threshold value to write into the register. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_ATR_SUP7_LOWER, XSM_ATR_TEMP_RMTE_LOWER, XSM_ATR_TEMP_RMTE_UPPER, XSYSMONPSU_ALRM_TEMP_UPR_OFFSET, and XSysmonPsu_WriteReg.
Referenced by SysMonPsuIntrExample(), SysMonPsuSingleChannelIntrExample(), and XSysMonPsu_SelfTest().
void XSysMonPsu_SetAvg | ( | XSysMonPsu * | InstancePtr, |
u8 | Average, | ||
u32 | SysmonBlk | ||
) |
This function sets the number of samples of averaging that is to be done for all the channels in both the single channel mode and sequence mode of operations.
InstancePtr | is a pointer to the XSysMonPsu instance. |
Average | is the number of samples of averaging programmed to the Configuration Register 0. Use the XSM_AVG_* definitions defined in xsysmonpsu.h file :
|
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_AVG_256_SAMPLES, XSYSMONPSU_CFG_REG0_OFFSET, XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
Referenced by SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
void XSysMonPsu_SetExtenalMux | ( | XSysMonPsu * | InstancePtr, |
u8 | Channel, | ||
u32 | SysmonBlk | ||
) |
The function enables the external mux and connects a channel to the mux.
InstancePtr | is a pointer to the XSysMonPsu instance. |
Channel | is the channel number used to connect to the external Mux. The valid channels are 0 to 5 and 16 to 31. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_CH_AUX_MAX, XSM_CH_AUX_MIN, XSM_CH_VREFN, XSYSMONPSU_CFG_REG0_OFFSET, XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
void XSysMonPsu_SetPSAutoConversion | ( | XSysMonPsu * | InstancePtr | ) |
This function sets the conversion to be automatic for PS SysMon.
InstancePtr | is a pointer to the XSysMonPsu instance. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_PS_SYSMON_CSTS_OFFSET, XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
s32 XSysMonPsu_SetSeqAcqTime | ( | XSysMonPsu * | InstancePtr, |
u64 | AcqCyclesChMask, | ||
u32 | SysmonBlk | ||
) |
This function sets the number of Acquisition cycles in the ADC Channel Acquisition Time Sequencer Registers.
The sequencer must be in the Safe Mode before writing to these registers.
InstancePtr | is a pointer to the XSysMonPsu instance. |
AcqCyclesChMask | is the bit mask of all the channels for which the number of acquisition cycles is to be extended. Use XSYSMONPSU_SEQ_ACQ* defined in xsysmonpsu_hw.h to specify the Channel numbers. Acquisition cycles will be extended to 10 ADCCLK cycles for bit masks of 1 and will be the default 4 ADCCLK cycles for bit masks of 0. The AcqCyclesChMask is a 64 bit mask that is written to the three 16 bit ADC Channel Acquisition Time Sequencer Registers. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_SEQ_MODE_SAFE, XSysMonPsu_GetSequencerMode(), XSYSMONPSU_SEQ_ACQ0_OFFSET, XSYSMONPSU_SEQ_ACQ1_OFFSET, XSYSMONPSU_SEQ_ACQ2_OFFSET, and XSysmonPsu_WriteReg.
s32 XSysMonPsu_SetSeqAvgEnables | ( | XSysMonPsu * | InstancePtr, |
u64 | AvgEnableChMask, | ||
u32 | SysmonBlk | ||
) |
This function enables the averaging for the specified channels in the ADC Channel Averaging Enable Sequencer Registers.
The sequencer must be in the Safe Mode before writing to these registers.
InstancePtr | is a pointer to the XSysMonPsu instance. |
AvgEnableChMask | is the bit mask of all the channels for which averaging is to be enabled. Use XSYSMONPSU_SEQ_AVERAGE* defined in xsysmonpsu_hw.h to specify the Channel numbers. Averaging will be enabled for bit masks of 1 and disabled for bit mask of 0. The AvgEnableChMask is a 64 bit mask that is written to the three 16 bit ADC Channel Averaging Enable Sequencer Registers. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_SEQ_MODE_SAFE, XSysMonPsu_GetSequencerMode(), XSYSMONPSU_SEQ_AVERAGE0_OFFSET, XSYSMONPSU_SEQ_AVERAGE1_OFFSET, and XSysmonPsu_WriteReg.
Referenced by SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
s32 XSysMonPsu_SetSeqChEnables | ( | XSysMonPsu * | InstancePtr, |
u64 | ChEnableMask, | ||
u32 | SysmonBlk | ||
) |
This function enables the specified channels in the ADC Channel Selection Sequencer Registers.
The sequencer must be in the Safe Mode before writing to these registers.
InstancePtr | is a pointer to the XSysMonPsu instance. |
ChEnableMask | is the bit mask of all the channels to be enabled. Use XSYSMONPSU_SEQ_CH* defined in xsysmon_hw.h to specify the Channel numbers. Bit masks of 1 will be enabled and bit mask of 0 will be disabled. The ChEnableMask is a 64 bit mask that is written to the three 16 bit ADC Channel Selection Sequencer Registers. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_SEQ_MODE_SAFE, XSysMonPsu_GetSequencerMode(), XSYSMONPSU_SEQ_CH0_OFFSET, XSYSMONPSU_SEQ_CH1_OFFSET, and XSysmonPsu_WriteReg.
Referenced by SysMonPsuIntrExample(), and SysMonPsuPolledPrintfExample().
s32 XSysMonPsu_SetSeqInputMode | ( | XSysMonPsu * | InstancePtr, |
u64 | InputModeChMask, | ||
u32 | SysmonBlk | ||
) |
This function sets the Analog input mode for the specified channels in the ADC Channel Analog-Input Mode Sequencer Registers.
The sequencer must be in the Safe Mode before writing to these registers.
InstancePtr | is a pointer to the XSysMonPsu instance. |
InputModeChMask | is the bit mask of all the channels for which the input mode is differential mode. Use XSYSMONPSU_SEQ_INPUT_MDE* defined in xsysmonpsu_hw.h to specify the channel numbers. Differential or Bipolar input mode will be set for bit masks of 1 and unipolar input mode for bit masks of 0. The InputModeChMask is a 64 bit mask that is written to the three 16 bit ADC Channel Analog-Input Mode Sequencer Registers. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_SEQ_MODE_SAFE, XSysMonPsu_GetSequencerMode(), XSYSMONPSU_SEQ_INPUT_MDE0_OFFSET, XSYSMONPSU_SEQ_INPUT_MDE1_OFFSET, and XSysmonPsu_WriteReg.
void XSysMonPsu_SetSequencerEvent | ( | XSysMonPsu * | InstancePtr, |
u32 | IsEventMode, | ||
u32 | SysmonBlk | ||
) |
The function enables the Event mode or Continuous mode in the sequencer mode.
InstancePtr | is a pointer to the XSysMonPsu instance. |
IsEventMode | is a boolean parameter that specifies continuous sampling (specify FALSE) or event driven sampling mode (specify TRUE) for the channel. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_CFG_REG0_OFFSET, XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
void XSysMonPsu_SetSequencerMode | ( | XSysMonPsu * | InstancePtr, |
u8 | SequencerMode, | ||
u32 | SysmonBlk | ||
) |
This function sets the specified Channel Sequencer Mode in the Configuration Register 1 :
- Default safe mode (XSM_SEQ_MODE_SAFE) - One pass through sequence (XSM_SEQ_MODE_ONEPASS) - Continuous channel sequencing (XSM_SEQ_MODE_CONTINPASS) - Single Channel/Sequencer off (XSM_SEQ_MODE_SINGCHAN) - Olympus sampling mode (XSM_SEQ_MODE_OYLMPUS)
InstancePtr | is a pointer to the XSysMonPsu instance. |
SequencerMode | is the sequencer mode to be set. Use XSM_SEQ_MODE_* bits defined in xsysmonpsu.h. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_SEQ_MODE_OYLMPUS, XSM_SEQ_MODE_SINGCHAN, XSYSMONPSU_CFG_REG1_OFFSET, XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
Referenced by SysMonPsuAMSExample(), SysMonPsuIntrExample(), SysMonPsuPolledPrintfExample(), and SysMonPsuSingleChannelIntrExample().
s32 XSysMonPsu_SetSingleChParams | ( | XSysMonPsu * | InstancePtr, |
u8 | Channel, | ||
u32 | IncreaseAcqCycles, | ||
u32 | IsEventMode, | ||
u32 | IsDifferentialMode, | ||
u32 | SysmonBlk | ||
) |
The function sets the given parameters in the Configuration Register 0 in the single channel mode.
InstancePtr | is a pointer to the XSysMonPsu instance. |
Channel | is the channel number for conversion. The valid channels are 0 - 6, 8 - 10, 13 - 37. |
IncreaseAcqCycles | is a boolean parameter which specifies whether the Acquisition time for the external channels has to be increased to 10 ADCCLK cycles (specify TRUE) or remain at the default 4 ADCCLK cycles (specify FALSE). This parameter is only valid for the external channels. |
IsEventMode | is a boolean parameter that specifies continuous sampling (specify FALSE) or event driven sampling mode (specify TRUE) for the given channel. |
IsDifferentialMode | is a boolean parameter which specifies unipolar(specify FALSE) or differential mode (specify TRUE) for the analog inputs. The input mode is only valid for the external channels. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSM_CH_AUX_MAX, XSM_CH_AUX_MIN, XSM_CH_GAINERR_CALIB, XSM_CH_RESERVE1, XSM_CH_SUPPLY3, XSM_CH_SUPPLY4, XSM_CH_SUPPLY_CALIB, XSM_CH_TEMP_REMTE, XSM_CH_VCC_PSLL0, XSM_CH_VPVN, XSM_SEQ_MODE_SINGCHAN, XSYSMONPSU_CFG_REG0_OFFSET, XSysMonPsu_GetSequencerMode(), XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
Referenced by SysMonPsuAMSExample(), and SysMonPsuSingleChannelIntrExample().
void XSysMonPsu_StartAdcConversion | ( | XSysMonPsu * | InstancePtr | ) |
This function starts the ADC conversion in the Single Channel event driven sampling mode.
The EOC bit in Status Register will be set once the conversion is finished. Refer to the device specification for more details.
InstancePtr | is a pointer to the XSysMonPsu instance. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu::IsReady, XSYSMONPSU_PS_SYSMON_CSTS_OFFSET, XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
u8 XSysMonPsu_UpdateAdcClkDivisor | ( | XSysMonPsu * | InstancePtr, |
u32 | SysmonBlk | ||
) |
The function update the ADCCLK divisor to the Configuration Register 2.
InstancePtr | is a pointer to the XSysMon instance. |
SysmonBlk | is the value that tells whether it is for PS Sysmon block or PL Sysmon block register region. |
References XSysMonPsu_Config::BaseAddress, XSysMonPsu::Config, XSysMonPsu_Config::InputClockMHz, XSYSMONPSU_CFG_REG2_OFFSET, XSysmonPsu_ReadReg, and XSysmonPsu_WriteReg.
Referenced by XSysMonPsu_CfgInitialize().