![]() |
xadcps
Xilinx SDK Drivers API Documentation
|
Data Structures | |
struct | XAdcPs_Config |
This typedef contains configuration information for the XADC/ADC device. More... | |
struct | XAdcPs |
The driver's instance data. More... | |
Macros | |
#define | XAdcPs_IsEventSamplingModeSet(InstancePtr) |
This macro checks if the XADC device is in Event Sampling mode. More... | |
#define | XAdcPs_IsExternalMuxModeSet(InstancePtr) |
This macro checks if the XADC device is in External Mux mode. More... | |
#define | XAdcPs_RawToTemperature(AdcData) ((((float)(AdcData)/65536.0f)/0.00198421639f ) - 273.15f) |
This macro converts XADC Raw Data to Temperature(centigrades). More... | |
#define | XAdcPs_RawToVoltage(AdcData) ((((float)(AdcData))* (3.0f))/65536.0f) |
This macro converts XADC/ADC Raw Data to Voltage(volts). More... | |
#define | XAdcPs_TemperatureToRaw(Temperature) ((int)(((Temperature) + 273.15f)*65536.0f*0.00198421639f)) |
This macro converts Temperature in centigrades to XADC/ADC Raw Data. More... | |
#define | XAdcPs_VoltageToRaw(Voltage) ((int)((Voltage)*65536.0f/3.0f)) |
This macro converts Voltage in Volts to XADC/ADC Raw Data. More... | |
#define | XAdcPs_WriteFifo(InstancePtr, Data) |
This macro is used for writing to the XADC Registers using the command FIFO. More... | |
#define | XAdcPs_ReadFifo(InstancePtr) |
This macro is used for reading from the XADC Registers using the data FIFO. More... | |
#define | XAdcPs_ReadReg(BaseAddress, RegOffset) (Xil_In32((BaseAddress) + (RegOffset))) |
Read a register of the XADC device. More... | |
#define | XAdcPs_WriteReg(BaseAddress, RegOffset, Data) (Xil_Out32((BaseAddress) + (RegOffset), (Data))) |
Write a register of the XADC device. More... | |
#define | XAdcPs_FormatWriteData(RegOffset, Data, ReadWrite) |
Formats the data to be written to the the XADC registers. More... | |
Functions | |
void | XAdcPs_WriteInternalReg (XAdcPs *InstancePtr, u32 RegOffset, u32 Data) |
This function is used for writing to XADC Registers using the command FIFO. More... | |
u32 | XAdcPs_ReadInternalReg (XAdcPs *InstancePtr, u32 RegOffset) |
This function is used for reading from the XADC Registers using the Data FIFO. More... | |
int | XAdcPs_CfgInitialize (XAdcPs *InstancePtr, XAdcPs_Config *ConfigPtr, u32 EffectiveAddr) |
This function initializes a specific XAdcPs device/instance. More... | |
void | XAdcPs_SetConfigRegister (XAdcPs *InstancePtr, u32 Data) |
The functions sets the contents of the Config Register. More... | |
u32 | XAdcPs_GetConfigRegister (XAdcPs *InstancePtr) |
The functions reads the contents of the Config Register. More... | |
u32 | XAdcPs_GetMiscStatus (XAdcPs *InstancePtr) |
The functions reads the contents of the Miscellaneous Status Register. More... | |
void | XAdcPs_SetMiscCtrlRegister (XAdcPs *InstancePtr, u32 Data) |
The functions sets the contents of the Miscellaneous Control register. More... | |
u32 | XAdcPs_GetMiscCtrlRegister (XAdcPs *InstancePtr) |
The functions reads the contents of the Miscellaneous control register. More... | |
void | XAdcPs_Reset (XAdcPs *InstancePtr) |
This function resets the XADC Hard Macro in the device. More... | |
u16 | XAdcPs_GetAdcData (XAdcPs *InstancePtr, u8 Channel) |
Get the ADC converted data for the specified channel. More... | |
u16 | XAdcPs_GetCalibCoefficient (XAdcPs *InstancePtr, u8 CoeffType) |
This function gets the calibration coefficient data for the specified parameter. More... | |
u16 | XAdcPs_GetMinMaxMeasurement (XAdcPs *InstancePtr, u8 MeasurementType) |
This function reads the Minimum/Maximum measurement for one of the specified parameters. More... | |
void | XAdcPs_SetAvg (XAdcPs *InstancePtr, u8 Average) |
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 | XAdcPs_GetAvg (XAdcPs *InstancePtr) |
This function returns the number of samples of averaging configured for all the channels in the Configuration Register 0. More... | |
int | XAdcPs_SetSingleChParams (XAdcPs *InstancePtr, u8 Channel, int IncreaseAcqCycles, int IsEventMode, int IsDifferentialMode) |
The function sets the given parameters in the Configuration Register 0 in the single channel mode. More... | |
void | XAdcPs_SetAlarmEnables (XAdcPs *InstancePtr, u16 AlmEnableMask) |
This function enables the alarm outputs for the specified alarms in the Configuration Register 1. More... | |
u16 | XAdcPs_GetAlarmEnables (XAdcPs *InstancePtr) |
This function gets the status of the alarm output enables in the Configuration Register 1. More... | |
void | XAdcPs_SetCalibEnables (XAdcPs *InstancePtr, u16 Calibration) |
This function enables the specified calibration in the Configuration Register 1 : More... | |
u16 | XAdcPs_GetCalibEnables (XAdcPs *InstancePtr) |
This function reads the value of the calibration enables from the Configuration Register 1. More... | |
void | XAdcPs_SetSequencerMode (XAdcPs *InstancePtr, u8 SequencerMode) |
This function sets the specified Channel Sequencer Mode in the Configuration Register 1 : More... | |
u8 | XAdcPs_GetSequencerMode (XAdcPs *InstancePtr) |
This function gets the channel sequencer mode from the Configuration Register 1. More... | |
void | XAdcPs_SetAdcClkDivisor (XAdcPs *InstancePtr, u8 Divisor) |
The function sets the frequency of the ADCCLK by configuring the DCLK to ADCCLK ratio in the Configuration Register #2. More... | |
u8 | XAdcPs_GetAdcClkDivisor (XAdcPs *InstancePtr) |
The function gets the ADCCLK divisor from the Configuration Register 2. More... | |
int | XAdcPs_SetSeqChEnables (XAdcPs *InstancePtr, u32 ChEnableMask) |
This function enables the specified channels in the ADC Channel Selection Sequencer Registers. More... | |
u32 | XAdcPs_GetSeqChEnables (XAdcPs *InstancePtr) |
This function gets the channel enable bits status from the ADC Channel Selection Sequencer Registers. More... | |
int | XAdcPs_SetSeqAvgEnables (XAdcPs *InstancePtr, u32 AvgEnableChMask) |
This function enables the averaging for the specified channels in the ADC Channel Averaging Enable Sequencer Registers. More... | |
u32 | XAdcPs_GetSeqAvgEnables (XAdcPs *InstancePtr) |
This function returns the channels for which the averaging has been enabled in the ADC Channel Averaging Enables Sequencer Registers. More... | |
int | XAdcPs_SetSeqInputMode (XAdcPs *InstancePtr, u32 InputModeChMask) |
This function sets the Analog input mode for the specified channels in the ADC Channel Analog-Input Mode Sequencer Registers. More... | |
u32 | XAdcPs_GetSeqInputMode (XAdcPs *InstancePtr) |
This function gets the Analog input mode for all the channels from the ADC Channel Analog-Input Mode Sequencer Registers. More... | |
int | XAdcPs_SetSeqAcqTime (XAdcPs *InstancePtr, u32 AcqCyclesChMask) |
This function sets the number of Acquisition cycles in the ADC Channel Acquisition Time Sequencer Registers. More... | |
u32 | XAdcPs_GetSeqAcqTime (XAdcPs *InstancePtr) |
This function gets the status of acquisition from the ADC Channel Acquisition Time Sequencer Registers. More... | |
void | XAdcPs_SetAlarmThreshold (XAdcPs *InstancePtr, u8 AlarmThrReg, u16 Value) |
This functions sets the contents of the given Alarm Threshold Register. More... | |
u16 | XAdcPs_GetAlarmThreshold (XAdcPs *InstancePtr, u8 AlarmThrReg) |
This function returns the contents of the specified Alarm Threshold Register. More... | |
void | XAdcPs_EnableUserOverTemp (XAdcPs *InstancePtr) |
This function enables programming of the powerdown temperature for the OverTemp signal in the OT Powerdown register. More... | |
void | XAdcPs_DisableUserOverTemp (XAdcPs *InstancePtr) |
This function disables programming of the powerdown temperature for the OverTemp signal in the OT Powerdown register. More... | |
void | XAdcPs_SetSequencerEvent (XAdcPs *InstancePtr, int IsEventMode) |
The function enables the Event mode or Continuous mode in the sequencer mode. More... | |
int | XAdcPs_GetSamplingMode (XAdcPs *InstancePtr) |
This function returns the sampling mode. More... | |
void | XAdcPs_SetMuxMode (XAdcPs *InstancePtr, int MuxMode, u8 Channel) |
This function sets the External Mux mode. More... | |
void | XAdcPs_SetPowerdownMode (XAdcPs *InstancePtr, u32 Mode) |
This function sets the Power Down mode. More... | |
u32 | XAdcPs_GetPowerdownMode (XAdcPs *InstancePtr) |
This function gets the Power Down mode. More... | |
XAdcPs_Config * | XAdcPs_LookupConfig (u16 DeviceId) |
Functions in xadcps_sinit.c. More... | |
int | XAdcPs_SelfTest (XAdcPs *InstancePtr) |
Functions in xadcps_selftest.c. More... | |
void | XAdcPs_IntrEnable (XAdcPs *InstancePtr, u32 Mask) |
Functions in xadcps_intr.c. More... | |
void | XAdcPs_IntrDisable (XAdcPs *InstancePtr, u32 Mask) |
This function disables the specified interrupts in the device. More... | |
u32 | XAdcPs_IntrGetEnabled (XAdcPs *InstancePtr) |
This function returns the enabled interrupts read from the Interrupt Mask Register (IPIER). More... | |
u32 | XAdcPs_IntrGetStatus (XAdcPs *InstancePtr) |
This function returns the interrupt status read from Interrupt Status Register(IPISR). More... | |
void | XAdcPs_IntrClear (XAdcPs *InstancePtr, u32 Mask) |
This function clears the specified interrupts in the Interrupt Status Register (IPISR). More... | |
Variables | |
XAdcPs_Config | XAdcPs_ConfigTable [XPAR_XADCPS_NUM_INSTANCES] |
This table contains configuration information for each XADC Monitor/ADC device in the system. More... | |
XAdcPs_Config | XAdcPs_ConfigTable [] |
This table contains configuration information for each XADC Monitor/ADC device in the system. More... | |
Indexes for the different channels. | |
#define | XADCPS_CH_TEMP 0x0 |
On Chip Temperature. More... | |
#define | XADCPS_CH_VCCINT 0x1 |
VCCINT. More... | |
#define | XADCPS_CH_VCCAUX 0x2 |
VCCAUX. More... | |
#define | XADCPS_CH_VPVN 0x3 |
VP/VN Dedicated analog inputs. More... | |
#define | XADCPS_CH_VREFP 0x4 |
VREFP. More... | |
#define | XADCPS_CH_VREFN 0x5 |
VREFN. More... | |
#define | XADCPS_CH_VBRAM 0x6 |
On-chip VBRAM Data Reg, 7 series. More... | |
#define | XADCPS_CH_SUPPLY_CALIB 0x07 |
Supply Calib Data Reg. More... | |
#define | XADCPS_CH_ADC_CALIB 0x08 |
ADC Offset Channel Reg. More... | |
#define | XADCPS_CH_GAINERR_CALIB 0x09 |
Gain Error Channel Reg. More... | |
#define | XADCPS_CH_VCCPINT 0x0D |
On-chip PS VCCPINT Channel , Zynq. More... | |
#define | XADCPS_CH_VCCPAUX 0x0E |
On-chip PS VCCPAUX Channel , Zynq. More... | |
#define | XADCPS_CH_VCCPDRO 0x0F |
On-chip PS VCCPDRO Channel , Zynq. More... | |
#define | XADCPS_CH_AUX_MIN 16 |
Channel number for 1st Aux Channel. More... | |
#define | XADCPS_CH_AUX_MAX 31 |
Channel number for Last Aux channel. More... | |
Indexes for reading the Calibration Coefficient Data. | |
#define | XADCPS_CALIB_SUPPLY_COEFF 0 |
Supply Offset Calib Coefficient. More... | |
#define | XADCPS_CALIB_ADC_COEFF 1 |
ADC Offset Calib Coefficient. More... | |
#define | XADCPS_CALIB_GAIN_ERROR_COEFF 2 |
Gain Error Calib Coefficient. More... | |
Indexes for reading the Minimum/Maximum Measurement Data. | |
#define | XADCPS_MAX_TEMP 0 |
Maximum Temperature Data. More... | |
#define | XADCPS_MAX_VCCINT 1 |
Maximum VCCINT Data. More... | |
#define | XADCPS_MAX_VCCAUX 2 |
Maximum VCCAUX Data. More... | |
#define | XADCPS_MAX_VBRAM 3 |
Maximum VBRAM Data. More... | |
#define | XADCPS_MIN_TEMP 4 |
Minimum Temperature Data. More... | |
#define | XADCPS_MIN_VCCINT 5 |
Minimum VCCINT Data. More... | |
#define | XADCPS_MIN_VCCAUX 6 |
Minimum VCCAUX Data. More... | |
#define | XADCPS_MIN_VBRAM 7 |
Minimum VBRAM Data. More... | |
#define | XADCPS_MAX_VCCPINT 8 |
Maximum VCCPINT Register , Zynq. More... | |
#define | XADCPS_MAX_VCCPAUX 9 |
Maximum VCCPAUX Register , Zynq. More... | |
#define | XADCPS_MAX_VCCPDRO 0xA |
Maximum VCCPDRO Register , Zynq. More... | |
#define | XADCPS_MIN_VCCPINT 0xC |
Minimum VCCPINT Register , Zynq. More... | |
#define | XADCPS_MIN_VCCPAUX 0xD |
Minimum VCCPAUX Register , Zynq. More... | |
#define | XADCPS_MIN_VCCPDRO 0xE |
Minimum VCCPDRO Register , Zynq. More... | |
Alarm Threshold(Limit) Register (ATR) indexes. | |
#define | XADCPS_ATR_TEMP_UPPER 0 |
High user Temperature. More... | |
#define | XADCPS_ATR_VCCINT_UPPER 1 |
VCCINT high voltage limit register. More... | |
#define | XADCPS_ATR_VCCAUX_UPPER 2 |
VCCAUX high voltage limit register. More... | |
#define | XADCPS_ATR_OT_UPPER 3 |
VCCAUX high voltage limit register. More... | |
#define | XADCPS_ATR_TEMP_LOWER 4 |
Upper Over Temperature limit Reg. More... | |
#define | XADCPS_ATR_VCCINT_LOWER 5 |
VCCINT high voltage limit register. More... | |
#define | XADCPS_ATR_VCCAUX_LOWER 6 |
VCCAUX low voltage limit register. More... | |
#define | XADCPS_ATR_OT_LOWER 7 |
Lower Over Temperature limit. More... | |
#define | XADCPS_ATR_VBRAM_UPPER_ 8 |
VRBAM Upper Alarm Reg, 7 Series. More... | |
#define | XADCPS_ATR_VCCPINT_UPPER 9 |
VCCPINT Upper Alarm Reg, Zynq. More... | |
#define | XADCPS_ATR_VCCPAUX_UPPER 0xA |
VCCPAUX Upper Alarm Reg, Zynq. More... | |
#define | XADCPS_ATR_VCCPDRO_UPPER 0xB |
VCCPDRO Upper Alarm Reg, Zynq. More... | |
#define | XADCPS_ATR_VBRAM_LOWER 0xC |
VRBAM Lower Alarm Reg, 7 Series. More... | |
#define | XADCPS_ATR_VCCPINT_LOWER 0xD |
VCCPINT Lower Alarm Reg , Zynq. More... | |
#define | XADCPS_ATR_VCCPAUX_LOWER 0xE |
VCCPAUX Lower Alarm Reg , Zynq. More... | |
#define | XADCPS_ATR_VCCPDRO_LOWER 0xF |
VCCPDRO Lower Alarm Reg , Zynq. More... | |
Averaging to be done for the channels. | |
#define | XADCPS_AVG_0_SAMPLES 0 |
No Averaging. More... | |
#define | XADCPS_AVG_16_SAMPLES 1 |
Average 16 samples. More... | |
#define | XADCPS_AVG_64_SAMPLES 2 |
Average 64 samples. More... | |
#define | XADCPS_AVG_256_SAMPLES 3 |
Average 256 samples. More... | |
Channel Sequencer Modes of operation | |
#define | XADCPS_SEQ_MODE_SAFE 0 |
Default Safe Mode. More... | |
#define | XADCPS_SEQ_MODE_ONEPASS 1 |
Onepass through Sequencer. More... | |
#define | XADCPS_SEQ_MODE_CONTINPASS 2 |
Continuous Cycling Sequencer. More... | |
#define | XADCPS_SEQ_MODE_SINGCHAN 3 |
Single channel -No Sequencing. More... | |
#define | XADCPS_SEQ_MODE_SIMUL_SAMPLING 4 |
Simultaneous sampling. More... | |
#define | XADCPS_SEQ_MODE_INDEPENDENT 8 |
Independent mode. More... | |
Power Down Modes | |
#define | XADCPS_PD_MODE_NONE 0 |
No Power Down. More... | |
#define | XADCPS_PD_MODE_ADCB 1 |
Power Down ADC B. More... | |
#define | XADCPS_PD_MODE_XADC 2 |
Power Down ADC A and ADC B. More... | |
Register offsets of XADC in the Device Config | |
The following constants provide access to each of the registers of the XADC device. | |
#define | XADCPS_CFG_OFFSET 0x00 |
Configuration Register. More... | |
#define | XADCPS_INT_STS_OFFSET 0x04 |
Interrupt Status Register. More... | |
#define | XADCPS_INT_MASK_OFFSET 0x08 |
Interrupt Mask Register. More... | |
#define | XADCPS_MSTS_OFFSET 0x0C |
Misc status register. More... | |
#define | XADCPS_CMDFIFO_OFFSET 0x10 |
Command FIFO Register. More... | |
#define | XADCPS_RDFIFO_OFFSET 0x14 |
Read FIFO Register. More... | |
#define | XADCPS_MCTL_OFFSET 0x18 |
Misc control register. More... | |
XADC Config Register Bit definitions | |
#define | XADCPS_CFG_ENABLE_MASK 0x80000000 |
Enable access from PS mask. More... | |
#define | XADCPS_CFG_CFIFOTH_MASK 0x00F00000 |
Command FIFO Threshold mask. More... | |
#define | XADCPS_CFG_DFIFOTH_MASK 0x000F0000 |
Data FIFO Threshold mask. More... | |
#define | XADCPS_CFG_WEDGE_MASK 0x00002000 |
Write Edge Mask. More... | |
#define | XADCPS_CFG_REDGE_MASK 0x00001000 |
Read Edge Mask. More... | |
#define | XADCPS_CFG_TCKRATE_MASK 0x00000300 |
Clock freq control. More... | |
#define | XADCPS_CFG_IGAP_MASK 0x0000001F |
Idle Gap between successive commands. More... | |
XADC Interrupt Status/Mask Register Bit definitions | |
The definitions are same for the Interrupt Status Register and Interrupt Mask Register. They are defined only once. | |
#define | XADCPS_INTX_ALL_MASK 0x000003FF |
Alarm Signals Mask. More... | |
#define | XADCPS_INTX_CFIFO_LTH_MASK 0x00000200 |
CMD FIFO less than threshold. More... | |
#define | XADCPS_INTX_DFIFO_GTH_MASK 0x00000100 |
Data FIFO greater than threshold. More... | |
#define | XADCPS_INTX_OT_MASK 0x00000080 |
Over temperature Alarm Status. More... | |
#define | XADCPS_INTX_ALM_ALL_MASK 0x0000007F |
Alarm Signals Mask. More... | |
#define | XADCPS_INTX_ALM6_MASK 0x00000040 |
Alarm 6 Mask. More... | |
#define | XADCPS_INTX_ALM5_MASK 0x00000020 |
Alarm 5 Mask. More... | |
#define | XADCPS_INTX_ALM4_MASK 0x00000010 |
Alarm 4 Mask. More... | |
#define | XADCPS_INTX_ALM3_MASK 0x00000008 |
Alarm 3 Mask. More... | |
#define | XADCPS_INTX_ALM2_MASK 0x00000004 |
Alarm 2 Mask. More... | |
#define | XADCPS_INTX_ALM1_MASK 0x00000002 |
Alarm 1 Mask. More... | |
#define | XADCPS_INTX_ALM0_MASK 0x00000001 |
Alarm 0 Mask. More... | |
XADC Miscellaneous Register Bit definitions | |
#define | XADCPS_MSTS_CFIFO_LVL_MASK 0x000F0000 |
Command FIFO Level mask. More... | |
#define | XADCPS_MSTS_DFIFO_LVL_MASK 0x0000F000 |
Data FIFO Level Mask. More... | |
#define | XADCPS_MSTS_CFIFOF_MASK 0x00000800 |
Command FIFO Full Mask. More... | |
#define | XADCPS_MSTS_CFIFOE_MASK 0x00000400 |
Command FIFO Empty Mask. More... | |
#define | XADCPS_MSTS_DFIFOF_MASK 0x00000200 |
Data FIFO Full Mask. More... | |
#define | XADCPS_MSTS_DFIFOE_MASK 0x00000100 |
Data FIFO Empty Mask. More... | |
#define | XADCPS_MSTS_OT_MASK 0x00000080 |
Over Temperature Mask. More... | |
#define | XADCPS_MSTS_ALM_MASK 0x0000007F |
Alarms Mask. More... | |
XADC Miscellaneous Control Register Bit definitions | |
#define | XADCPS_MCTL_RESET_MASK 0x00000010 |
Reset XADC. More... | |
#define | XADCPS_MCTL_FLUSH_MASK 0x00000001 |
Flush the FIFOs. More... | |
Internal Register offsets of the XADC | |
The following constants provide access to each of the internal registers of the XADC device. | |
#define | XADCPS_TEMP_OFFSET 0x00 |
On-chip Temperature Reg. More... | |
#define | XADCPS_VCCINT_OFFSET 0x01 |
On-chip VCCINT Data Reg. More... | |
#define | XADCPS_VCCAUX_OFFSET 0x02 |
On-chip VCCAUX Data Reg. More... | |
#define | XADCPS_VPVN_OFFSET 0x03 |
ADC out of VP/VN. More... | |
#define | XADCPS_VREFP_OFFSET 0x04 |
On-chip VREFP Data Reg. More... | |
#define | XADCPS_VREFN_OFFSET 0x05 |
On-chip VREFN Data Reg. More... | |
#define | XADCPS_VBRAM_OFFSET 0x06 |
On-chip VBRAM , 7 Series. More... | |
#define | XADCPS_ADC_A_SUPPLY_CALIB_OFFSET 0x08 |
ADC A Supply Offset Reg. More... | |
#define | XADCPS_ADC_A_OFFSET_CALIB_OFFSET 0x09 |
ADC A Offset Data Reg. More... | |
#define | XADCPS_ADC_A_GAINERR_CALIB_OFFSET 0x0A |
ADC A Gain Error Reg. More... | |
#define | XADCPS_VCCPINT_OFFSET 0x0D |
On-chip VCCPINT Reg, Zynq. More... | |
#define | XADCPS_VCCPAUX_OFFSET 0x0E |
On-chip VCCPAUX Reg, Zynq. More... | |
#define | XADCPS_VCCPDRO_OFFSET 0x0F |
On-chip VCCPDRO Reg, Zynq. More... | |
#define | XADCPS_AUX00_OFFSET 0x10 |
ADC out of VAUXP0/VAUXN0. More... | |
#define | XADCPS_AUX01_OFFSET 0x11 |
ADC out of VAUXP1/VAUXN1. More... | |
#define | XADCPS_AUX02_OFFSET 0x12 |
ADC out of VAUXP2/VAUXN2. More... | |
#define | XADCPS_AUX03_OFFSET 0x13 |
ADC out of VAUXP3/VAUXN3. More... | |
#define | XADCPS_AUX04_OFFSET 0x14 |
ADC out of VAUXP4/VAUXN4. More... | |
#define | XADCPS_AUX05_OFFSET 0x15 |
ADC out of VAUXP5/VAUXN5. More... | |
#define | XADCPS_AUX06_OFFSET 0x16 |
ADC out of VAUXP6/VAUXN6. More... | |
#define | XADCPS_AUX07_OFFSET 0x17 |
ADC out of VAUXP7/VAUXN7. More... | |
#define | XADCPS_AUX08_OFFSET 0x18 |
ADC out of VAUXP8/VAUXN8. More... | |
#define | XADCPS_AUX09_OFFSET 0x19 |
ADC out of VAUXP9/VAUXN9. More... | |
#define | XADCPS_AUX10_OFFSET 0x1A |
ADC out of VAUXP10/VAUXN10. More... | |
#define | XADCPS_AUX11_OFFSET 0x1B |
ADC out of VAUXP11/VAUXN11. More... | |
#define | XADCPS_AUX12_OFFSET 0x1C |
ADC out of VAUXP12/VAUXN12. More... | |
#define | XADCPS_AUX13_OFFSET 0x1D |
ADC out of VAUXP13/VAUXN13. More... | |
#define | XADCPS_AUX14_OFFSET 0x1E |
ADC out of VAUXP14/VAUXN14. More... | |
#define | XADCPS_AUX15_OFFSET 0x1F |
ADC out of VAUXP15/VAUXN15. More... | |
#define | XADCPS_MAX_TEMP_OFFSET 0x20 |
Max Temperature Reg. More... | |
#define | XADCPS_MAX_VCCINT_OFFSET 0x21 |
Max VCCINT Register. More... | |
#define | XADCPS_MAX_VCCAUX_OFFSET 0x22 |
Max VCCAUX Register. More... | |
#define | XADCPS_MAX_VCCBRAM_OFFSET 0x23 |
Max BRAM Register, 7 series. More... | |
#define | XADCPS_MIN_TEMP_OFFSET 0x24 |
Min Temperature Reg. More... | |
#define | XADCPS_MIN_VCCINT_OFFSET 0x25 |
Min VCCINT Register. More... | |
#define | XADCPS_MIN_VCCAUX_OFFSET 0x26 |
Min VCCAUX Register. More... | |
#define | XADCPS_MIN_VCCBRAM_OFFSET 0x27 |
Min BRAM Register, 7 series. More... | |
#define | XADCPS_MAX_VCCPINT_OFFSET 0x28 |
Max VCCPINT Register, Zynq. More... | |
#define | XADCPS_MAX_VCCPAUX_OFFSET 0x29 |
Max VCCPAUX Register, Zynq. More... | |
#define | XADCPS_MAX_VCCPDRO_OFFSET 0x2A |
Max VCCPDRO Register, Zynq. More... | |
#define | XADCPS_MIN_VCCPINT_OFFSET 0x2C |
Min VCCPINT Register, Zynq. More... | |
#define | XADCPS_MIN_VCCPAUX_OFFSET 0x2D |
Min VCCPAUX Register, Zynq. More... | |
#define | XADCPS_MIN_VCCPDRO_OFFSET 0x2E |
Min VCCPDRO Register,Zynq. More... | |
#define | XADCPS_FLAG_OFFSET 0x3F |
Flag Register. More... | |
#define | XADCPS_CFR0_OFFSET 0x40 |
Configuration Register 0. More... | |
#define | XADCPS_CFR1_OFFSET 0x41 |
Configuration Register 1. More... | |
#define | XADCPS_CFR2_OFFSET 0x42 |
Configuration Register 2. More... | |
#define | XADCPS_SEQ00_OFFSET 0x48 |
Seq Reg 00 Adc Channel Selection. More... | |
#define | XADCPS_SEQ01_OFFSET 0x49 |
Seq Reg 01 Adc Channel Selection. More... | |
#define | XADCPS_SEQ02_OFFSET 0x4A |
Seq Reg 02 Adc Average Enable. More... | |
#define | XADCPS_SEQ03_OFFSET 0x4B |
Seq Reg 03 Adc Average Enable. More... | |
#define | XADCPS_SEQ04_OFFSET 0x4C |
Seq Reg 04 Adc Input Mode Select. More... | |
#define | XADCPS_SEQ05_OFFSET 0x4D |
Seq Reg 05 Adc Input Mode Select. More... | |
#define | XADCPS_SEQ06_OFFSET 0x4E |
Seq Reg 06 Adc Acquisition Select. More... | |
#define | XADCPS_SEQ07_OFFSET 0x4F |
Seq Reg 07 Adc Acquisition Select. More... | |
#define | XADCPS_ATR_TEMP_UPPER_OFFSET 0x50 |
Temp Upper Alarm Register. More... | |
#define | XADCPS_ATR_VCCINT_UPPER_OFFSET 0x51 |
VCCINT Upper Alarm Reg. More... | |
#define | XADCPS_ATR_VCCAUX_UPPER_OFFSET 0x52 |
VCCAUX Upper Alarm Reg. More... | |
#define | XADCPS_ATR_OT_UPPER_OFFSET 0x53 |
Over Temp Upper Alarm Reg. More... | |
#define | XADCPS_ATR_TEMP_LOWER_OFFSET 0x54 |
Temp Lower Alarm Register. More... | |
#define | XADCPS_ATR_VCCINT_LOWER_OFFSET 0x55 |
VCCINT Lower Alarm Reg. More... | |
#define | XADCPS_ATR_VCCAUX_LOWER_OFFSET 0x56 |
VCCAUX Lower Alarm Reg. More... | |
#define | XADCPS_ATR_OT_LOWER_OFFSET 0x57 |
Over Temp Lower Alarm Reg. More... | |
#define | XADCPS_ATR_VBRAM_UPPER_OFFSET 0x58 |
VBRAM Upper Alarm, 7 series. More... | |
#define | XADCPS_ATR_VCCPINT_UPPER_OFFSET 0x59 |
VCCPINT Upper Alarm, Zynq. More... | |
#define | XADCPS_ATR_VCCPAUX_UPPER_OFFSET 0x5A |
VCCPAUX Upper Alarm, Zynq. More... | |
#define | XADCPS_ATR_VCCPDRO_UPPER_OFFSET 0x5B |
VCCPDRO Upper Alarm, Zynq. More... | |
#define | XADCPS_ATR_VBRAM_LOWER_OFFSET 0x5C |
VRBAM Lower Alarm, 7 Series. More... | |
#define | XADCPS_ATR_VCCPINT_LOWER_OFFSET 0x5D |
VCCPINT Lower Alarm, Zynq. More... | |
#define | XADCPS_ATR_VCCPAUX_LOWER_OFFSET 0x5E |
VCCPAUX Lower Alarm, Zynq. More... | |
#define | XADCPS_ATR_VCCPDRO_LOWER_OFFSET 0x5F |
VCCPDRO Lower Alarm, Zynq. More... | |
Configuration Register 0 (CFR0) mask(s) | |
#define | XADCPS_CFR0_CAL_AVG_MASK 0x8000 |
Averaging enable Mask. More... | |
#define | XADCPS_CFR0_AVG_VALID_MASK 0x3000 |
Averaging bit Mask. More... | |
#define | XADCPS_CFR0_AVG1_MASK 0x0000 |
No Averaging. More... | |
#define | XADCPS_CFR0_AVG16_MASK 0x1000 |
Average 16 samples. More... | |
#define | XADCPS_CFR0_AVG64_MASK 0x2000 |
Average 64 samples. More... | |
#define | XADCPS_CFR0_AVG256_MASK 0x3000 |
Average 256 samples. More... | |
#define | XADCPS_CFR0_AVG_SHIFT 12 |
Averaging bits shift. More... | |
#define | XADCPS_CFR0_MUX_MASK 0x0800 |
External Mask Enable. More... | |
#define | XADCPS_CFR0_DU_MASK 0x0400 |
Bipolar/Unipolar mode. More... | |
#define | XADCPS_CFR0_EC_MASK 0x0200 |
Event driven/ Continuous mode selection. More... | |
#define | XADCPS_CFR0_ACQ_MASK 0x0100 |
Add acquisition by 6 ADCCLK. More... | |
#define | XADCPS_CFR0_CHANNEL_MASK 0x001F |
Channel number bit Mask. More... | |
Configuration Register 1 (CFR1) mask(s) | |
#define | XADCPS_CFR1_SEQ_VALID_MASK 0xF000 |
Sequence bit Mask. More... | |
#define | XADCPS_CFR1_SEQ_SAFEMODE_MASK 0x0000 |
Default Safe Mode. More... | |
#define | XADCPS_CFR1_SEQ_ONEPASS_MASK 0x1000 |
Onepass through Seq. More... | |
#define | XADCPS_CFR1_SEQ_CONTINPASS_MASK 0x2000 |
Continuous Cycling Seq. More... | |
#define | XADCPS_CFR1_SEQ_SINGCHAN_MASK 0x3000 |
Single channel - No Seq. More... | |
#define | XADCPS_CFR1_SEQ_SIMUL_SAMPLING_MASK 0x4000 |
Simulataneous Sampling Mask. More... | |
#define | XADCPS_CFR1_SEQ_INDEPENDENT_MASK 0x8000 |
Independent Mode. More... | |
#define | XADCPS_CFR1_SEQ_SHIFT 12 |
Sequence bit shift. More... | |
#define | XADCPS_CFR1_ALM_VCCPDRO_MASK 0x0800 |
Alm 6 - VCCPDRO, Zynq. More... | |
#define | XADCPS_CFR1_ALM_VCCPAUX_MASK 0x0400 |
Alm 5 - VCCPAUX, Zynq. More... | |
#define | XADCPS_CFR1_ALM_VCCPINT_MASK 0x0200 |
Alm 4 - VCCPINT, Zynq. More... | |
#define | XADCPS_CFR1_ALM_VBRAM_MASK 0x0100 |
Alm 3 - VBRAM, 7 series. More... | |
#define | XADCPS_CFR1_CAL_VALID_MASK 0x00F0 |
Valid Calibration Mask. More... | |
#define | XADCPS_CFR1_CAL_PS_GAIN_OFFSET_MASK 0x0080 |
Calibration 3 -Power Supply Gain/Offset Enable. More... | |
#define | XADCPS_CFR1_CAL_PS_OFFSET_MASK 0x0040 |
Calibration 2 -Power Supply Offset Enable. More... | |
#define | XADCPS_CFR1_CAL_ADC_GAIN_OFFSET_MASK 0x0020 |
Calibration 1 -ADC Gain Offset Enable. More... | |
#define | XADCPS_CFR1_CAL_ADC_OFFSET_MASK 0x0010 |
Calibration 0 -ADC Offset Enable. More... | |
#define | XADCPS_CFR1_CAL_DISABLE_MASK 0x0000 |
No Calibration. More... | |
#define | XADCPS_CFR1_ALM_ALL_MASK 0x0F0F |
Mask for all alarms. More... | |
#define | XADCPS_CFR1_ALM_VCCAUX_MASK 0x0008 |
Alarm 2 - VCCAUX Enable. More... | |
#define | XADCPS_CFR1_ALM_VCCINT_MASK 0x0004 |
Alarm 1 - VCCINT Enable. More... | |
#define | XADCPS_CFR1_ALM_TEMP_MASK 0x0002 |
Alarm 0 - Temperature. More... | |
#define | XADCPS_CFR1_OT_MASK 0x0001 |
Over Temperature Enable. More... | |
Configuration Register 2 (CFR2) mask(s) | |
#define | XADCPS_CFR2_CD_VALID_MASK 0xFF00 |
Clock Divisor bit Mask. More... | |
#define | XADCPS_CFR2_CD_SHIFT 8 |
Num of shift on division. More... | |
#define | XADCPS_CFR2_CD_MIN 8 |
Minimum value of divisor. More... | |
#define | XADCPS_CFR2_CD_MIN 8 |
Minimum value of divisor. More... | |
#define | XADCPS_CFR2_CD_MAX 255 |
Maximum value of divisor. More... | |
#define | XADCPS_CFR2_PD_MASK 0x0030 |
Power Down Mask. More... | |
#define | XADCPS_CFR2_PD_XADC_MASK 0x0030 |
Power Down XADC Mask. More... | |
#define | XADCPS_CFR2_PD_ADC1_MASK 0x0020 |
Power Down ADC1 Mask. More... | |
#define | XADCPS_CFR2_PD_SHIFT 4 |
Power Down Shift. More... | |
Sequence Register (SEQ) Bit Definitions | |
#define | XADCPS_SEQ_CH_CALIB 0x00000001 |
ADC Calibration Channel. More... | |
#define | XADCPS_SEQ_CH_VCCPINT 0x00000020 |
VCCPINT, Zynq Only. More... | |
#define | XADCPS_SEQ_CH_VCCPAUX 0x00000040 |
VCCPAUX, Zynq Only. More... | |
#define | XADCPS_SEQ_CH_VCCPDRO 0x00000080 |
VCCPDRO, Zynq Only. More... | |
#define | XADCPS_SEQ_CH_TEMP 0x00000100 |
On Chip Temperature Channel. More... | |
#define | XADCPS_SEQ_CH_VCCINT 0x00000200 |
VCCINT Channel. More... | |
#define | XADCPS_SEQ_CH_VCCAUX 0x00000400 |
VCCAUX Channel. More... | |
#define | XADCPS_SEQ_CH_VPVN 0x00000800 |
VP/VN analog inputs Channel. More... | |
#define | XADCPS_SEQ_CH_VREFP 0x00001000 |
VREFP Channel. More... | |
#define | XADCPS_SEQ_CH_VREFN 0x00002000 |
VREFN Channel. More... | |
#define | XADCPS_SEQ_CH_VBRAM 0x00004000 |
VBRAM Channel, 7 series. More... | |
#define | XADCPS_SEQ_CH_AUX00 0x00010000 |
1st Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX01 0x00020000 |
2nd Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX02 0x00040000 |
3rd Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX03 0x00080000 |
4th Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX04 0x00100000 |
5th Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX05 0x00200000 |
6th Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX06 0x00400000 |
7th Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX07 0x00800000 |
8th Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX08 0x01000000 |
9th Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX09 0x02000000 |
10th Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX10 0x04000000 |
11th Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX11 0x08000000 |
12th Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX12 0x10000000 |
13th Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX13 0x20000000 |
14th Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX14 0x40000000 |
15th Aux Channel More... | |
#define | XADCPS_SEQ_CH_AUX15 0x80000000 |
16th Aux Channel More... | |
#define | XADCPS_SEQ00_CH_VALID_MASK 0x7FE1 |
Mask for the valid channels. More... | |
#define | XADCPS_SEQ01_CH_VALID_MASK 0xFFFF |
Mask for the valid channels. More... | |
#define | XADCPS_SEQ02_CH_VALID_MASK 0x7FE0 |
Mask for the valid channels. More... | |
#define | XADCPS_SEQ03_CH_VALID_MASK 0xFFFF |
Mask for the valid channels. More... | |
#define | XADCPS_SEQ04_CH_VALID_MASK 0x0800 |
Mask for the valid channels. More... | |
#define | XADCPS_SEQ05_CH_VALID_MASK 0xFFFF |
Mask for the valid channels. More... | |
#define | XADCPS_SEQ06_CH_VALID_MASK 0x0800 |
Mask for the valid channels. More... | |
#define | XADCPS_SEQ07_CH_VALID_MASK 0xFFFF |
Mask for the valid channels. More... | |
#define | XADCPS_SEQ_CH_AUX_SHIFT 16 |
Shift for the Aux Channel. More... | |
OT Upper Alarm Threshold Register Bit Definitions | |
#define | XADCPS_ATR_OT_UPPER_ENB_MASK 0x000F |
Mask for OT enable. More... | |
#define | XADCPS_ATR_OT_UPPER_VAL_MASK 0xFFF0 |
Mask for OT value. More... | |
#define | XADCPS_ATR_OT_UPPER_VAL_SHIFT 4 |
Shift for OT value. More... | |
#define | XADCPS_ATR_OT_UPPER_ENB_VAL 0x0003 |
Value for OT enable. More... | |
#define | XADCPS_ATR_OT_UPPER_VAL_MAX 0x0FFF |
Max OT value. More... | |
JTAG DRP Bit Definitions | |
#define | XADCPS_JTAG_DATA_MASK 0x0000FFFF |
Mask for the Data. More... | |
#define | XADCPS_JTAG_ADDR_MASK 0x03FF0000 |
Mask for the Addr. More... | |
#define | XADCPS_JTAG_ADDR_SHIFT 16 |
Shift for the Addr. More... | |
#define | XADCPS_JTAG_CMD_MASK 0x3C000000 |
Mask for the Cmd. More... | |
#define | XADCPS_JTAG_CMD_WRITE_MASK 0x08000000 |
Mask for CMD Write. More... | |
#define | XADCPS_JTAG_CMD_READ_MASK 0x04000000 |
Mask for CMD Read. More... | |
#define | XADCPS_JTAG_CMD_SHIFT 26 |
Shift for the Cmd. More... | |
Unlock Register Definitions | |
#define | XADCPS_UNLK_OFFSET 0x034 |
Unlock Register. More... | |
#define | XADCPS_UNLK_VALUE 0x757BDF0D |
Unlock Value. More... | |
#define XADCPS_ADC_A_GAINERR_CALIB_OFFSET 0x0A |
#include <xadcps_hw.h>
ADC A Gain Error Reg.
#define XADCPS_ADC_A_OFFSET_CALIB_OFFSET 0x09 |
#include <xadcps_hw.h>
ADC A Offset Data Reg.
#define XADCPS_ADC_A_SUPPLY_CALIB_OFFSET 0x08 |
#define XADCPS_ATR_OT_LOWER 7 |
#include <xadcps.h>
Lower Over Temperature limit.
#define XADCPS_ATR_OT_LOWER_OFFSET 0x57 |
#include <xadcps_hw.h>
Over Temp Lower Alarm Reg.
#define XADCPS_ATR_OT_UPPER 3 |
#include <xadcps.h>
VCCAUX high voltage limit register.
#define XADCPS_ATR_OT_UPPER_ENB_MASK 0x000F |
#include <xadcps_hw.h>
Mask for OT enable.
Referenced by XAdcPs_DisableUserOverTemp(), and XAdcPs_EnableUserOverTemp().
#define XADCPS_ATR_OT_UPPER_ENB_VAL 0x0003 |
#define XADCPS_ATR_OT_UPPER_OFFSET 0x53 |
#include <xadcps_hw.h>
Over Temp Upper Alarm Reg.
Referenced by XAdcPs_DisableUserOverTemp(), and XAdcPs_EnableUserOverTemp().
#define XADCPS_ATR_OT_UPPER_VAL_MASK 0xFFF0 |
#include <xadcps_hw.h>
Mask for OT value.
#define XADCPS_ATR_OT_UPPER_VAL_MAX 0x0FFF |
#include <xadcps_hw.h>
Max OT value.
#define XADCPS_ATR_OT_UPPER_VAL_SHIFT 4 |
#include <xadcps_hw.h>
Shift for OT value.
#define XADCPS_ATR_TEMP_LOWER 4 |
#define XADCPS_ATR_TEMP_LOWER_OFFSET 0x54 |
#include <xadcps_hw.h>
Temp Lower Alarm Register.
#define XADCPS_ATR_TEMP_UPPER 0 |
#define XADCPS_ATR_TEMP_UPPER_OFFSET 0x50 |
#include <xadcps_hw.h>
Temp Upper Alarm Register.
Referenced by XAdcPs_GetAlarmThreshold(), and XAdcPs_SetAlarmThreshold().
#define XADCPS_ATR_VBRAM_LOWER 0xC |
#include <xadcps.h>
VRBAM Lower Alarm Reg, 7 Series.
#define XADCPS_ATR_VBRAM_LOWER_OFFSET 0x5C |
#include <xadcps_hw.h>
VRBAM Lower Alarm, 7 Series.
#define XADCPS_ATR_VBRAM_UPPER_ 8 |
#include <xadcps.h>
VRBAM Upper Alarm Reg, 7 Series.
#define XADCPS_ATR_VBRAM_UPPER_OFFSET 0x58 |
#include <xadcps_hw.h>
VBRAM Upper Alarm, 7 series.
#define XADCPS_ATR_VCCAUX_LOWER 6 |
#include <xadcps.h>
VCCAUX low voltage limit register.
#define XADCPS_ATR_VCCAUX_LOWER_OFFSET 0x56 |
#include <xadcps_hw.h>
VCCAUX Lower Alarm Reg.
#define XADCPS_ATR_VCCAUX_UPPER 2 |
#include <xadcps.h>
VCCAUX high voltage limit register.
#define XADCPS_ATR_VCCAUX_UPPER_OFFSET 0x52 |
#include <xadcps_hw.h>
VCCAUX Upper Alarm Reg.
#define XADCPS_ATR_VCCINT_LOWER 5 |
#include <xadcps.h>
VCCINT high voltage limit register.
#define XADCPS_ATR_VCCINT_LOWER_OFFSET 0x55 |
#include <xadcps_hw.h>
VCCINT Lower Alarm Reg.
#define XADCPS_ATR_VCCINT_UPPER 1 |
#define XADCPS_ATR_VCCINT_UPPER_OFFSET 0x51 |
#include <xadcps_hw.h>
VCCINT Upper Alarm Reg.
#define XADCPS_ATR_VCCPAUX_LOWER 0xE |
#define XADCPS_ATR_VCCPAUX_LOWER_OFFSET 0x5E |
#include <xadcps_hw.h>
VCCPAUX Lower Alarm, Zynq.
#define XADCPS_ATR_VCCPAUX_UPPER 0xA |
#define XADCPS_ATR_VCCPAUX_UPPER_OFFSET 0x5A |
#include <xadcps_hw.h>
VCCPAUX Upper Alarm, Zynq.
#define XADCPS_ATR_VCCPDRO_LOWER 0xF |
#include <xadcps.h>
VCCPDRO Lower Alarm Reg , Zynq.
Referenced by XAdcPs_GetAlarmThreshold(), and XAdcPs_SetAlarmThreshold().
#define XADCPS_ATR_VCCPDRO_LOWER_OFFSET 0x5F |
#include <xadcps_hw.h>
VCCPDRO Lower Alarm, Zynq.
#define XADCPS_ATR_VCCPDRO_UPPER 0xB |
#include <xadcps.h>
VCCPDRO Upper Alarm Reg, Zynq.
#define XADCPS_ATR_VCCPDRO_UPPER_OFFSET 0x5B |
#include <xadcps_hw.h>
VCCPDRO Upper Alarm, Zynq.
#define XADCPS_ATR_VCCPINT_LOWER 0xD |
#include <xadcps.h>
VCCPINT Lower Alarm Reg , Zynq.
#define XADCPS_ATR_VCCPINT_LOWER_OFFSET 0x5D |
#include <xadcps_hw.h>
VCCPINT Lower Alarm, Zynq.
#define XADCPS_ATR_VCCPINT_UPPER 9 |
#include <xadcps.h>
VCCPINT Upper Alarm Reg, Zynq.
#define XADCPS_ATR_VCCPINT_UPPER_OFFSET 0x59 |
#include <xadcps_hw.h>
VCCPINT Upper Alarm, Zynq.
#define XADCPS_AUX00_OFFSET 0x10 |
#include <xadcps_hw.h>
ADC out of VAUXP0/VAUXN0.
#define XADCPS_AUX01_OFFSET 0x11 |
#include <xadcps_hw.h>
ADC out of VAUXP1/VAUXN1.
#define XADCPS_AUX02_OFFSET 0x12 |
#include <xadcps_hw.h>
ADC out of VAUXP2/VAUXN2.
#define XADCPS_AUX03_OFFSET 0x13 |
#include <xadcps_hw.h>
ADC out of VAUXP3/VAUXN3.
#define XADCPS_AUX04_OFFSET 0x14 |
#include <xadcps_hw.h>
ADC out of VAUXP4/VAUXN4.
#define XADCPS_AUX05_OFFSET 0x15 |
#include <xadcps_hw.h>
ADC out of VAUXP5/VAUXN5.
#define XADCPS_AUX06_OFFSET 0x16 |
#include <xadcps_hw.h>
ADC out of VAUXP6/VAUXN6.
#define XADCPS_AUX07_OFFSET 0x17 |
#include <xadcps_hw.h>
ADC out of VAUXP7/VAUXN7.
#define XADCPS_AUX08_OFFSET 0x18 |
#include <xadcps_hw.h>
ADC out of VAUXP8/VAUXN8.
#define XADCPS_AUX09_OFFSET 0x19 |
#include <xadcps_hw.h>
ADC out of VAUXP9/VAUXN9.
#define XADCPS_AUX10_OFFSET 0x1A |
#include <xadcps_hw.h>
ADC out of VAUXP10/VAUXN10.
#define XADCPS_AUX11_OFFSET 0x1B |
#include <xadcps_hw.h>
ADC out of VAUXP11/VAUXN11.
#define XADCPS_AUX12_OFFSET 0x1C |
#include <xadcps_hw.h>
ADC out of VAUXP12/VAUXN12.
#define XADCPS_AUX13_OFFSET 0x1D |
#include <xadcps_hw.h>
ADC out of VAUXP13/VAUXN13.
#define XADCPS_AUX14_OFFSET 0x1E |
#include <xadcps_hw.h>
ADC out of VAUXP14/VAUXN14.
#define XADCPS_AUX15_OFFSET 0x1F |
#include <xadcps_hw.h>
ADC out of VAUXP15/VAUXN15.
#define XADCPS_AVG_0_SAMPLES 0 |
#include <xadcps.h>
No Averaging.
#define XADCPS_AVG_16_SAMPLES 1 |
#include <xadcps.h>
Average 16 samples.
#define XADCPS_AVG_256_SAMPLES 3 |
#define XADCPS_AVG_64_SAMPLES 2 |
#include <xadcps.h>
Average 64 samples.
#define XADCPS_CALIB_ADC_COEFF 1 |
#include <xadcps.h>
ADC Offset Calib Coefficient.
#define XADCPS_CALIB_GAIN_ERROR_COEFF 2 |
#define XADCPS_CALIB_SUPPLY_COEFF 0 |
#include <xadcps.h>
Supply Offset Calib Coefficient.
#define XADCPS_CFG_CFIFOTH_MASK 0x00F00000 |
#define XADCPS_CFG_DFIFOTH_MASK 0x000F0000 |
#define XADCPS_CFG_ENABLE_MASK 0x80000000 |
#define XADCPS_CFG_IGAP_MASK 0x0000001F |
#include <xadcps_hw.h>
Idle Gap between successive commands.
#define XADCPS_CFG_OFFSET 0x00 |
#include <xadcps_hw.h>
Configuration Register.
Referenced by XAdcPs_CfgInitialize(), XAdcPs_GetConfigRegister(), and XAdcPs_SetConfigRegister().
#define XADCPS_CFG_REDGE_MASK 0x00001000 |
#include <xadcps_hw.h>
Read Edge Mask.
#define XADCPS_CFG_TCKRATE_MASK 0x00000300 |
#include <xadcps_hw.h>
Clock freq control.
#define XADCPS_CFG_WEDGE_MASK 0x00002000 |
#include <xadcps_hw.h>
Write Edge Mask.
#define XADCPS_CFR0_ACQ_MASK 0x0100 |
#define XADCPS_CFR0_AVG16_MASK 0x1000 |
#include <xadcps_hw.h>
Average 16 samples.
#define XADCPS_CFR0_AVG1_MASK 0x0000 |
#include <xadcps_hw.h>
No Averaging.
#define XADCPS_CFR0_AVG256_MASK 0x3000 |
#include <xadcps_hw.h>
Average 256 samples.
#define XADCPS_CFR0_AVG64_MASK 0x2000 |
#include <xadcps_hw.h>
Average 64 samples.
#define XADCPS_CFR0_AVG_SHIFT 12 |
#define XADCPS_CFR0_AVG_VALID_MASK 0x3000 |
#include <xadcps_hw.h>
Averaging bit Mask.
Referenced by XAdcPs_GetAvg(), XAdcPs_SetAvg(), and XAdcPs_SetSingleChParams().
#define XADCPS_CFR0_CAL_AVG_MASK 0x8000 |
#include <xadcps_hw.h>
Averaging enable Mask.
#define XADCPS_CFR0_CHANNEL_MASK 0x001F |
#include <xadcps_hw.h>
Channel number bit Mask.
Referenced by XAdcPs_SetMuxMode(), and XAdcPs_SetSingleChParams().
#define XADCPS_CFR0_DU_MASK 0x0400 |
#define XADCPS_CFR0_EC_MASK 0x0200 |
#include <xadcps_hw.h>
Event driven/ Continuous mode selection.
Referenced by XAdcPs_GetSamplingMode(), XAdcPs_SetSequencerEvent(), and XAdcPs_SetSingleChParams().
#define XADCPS_CFR0_MUX_MASK 0x0800 |
#define XADCPS_CFR0_OFFSET 0x40 |
#include <xadcps_hw.h>
Configuration Register 0.
Referenced by XAdcPs_GetAvg(), XAdcPs_GetSamplingMode(), XAdcPs_SetAvg(), XAdcPs_SetMuxMode(), XAdcPs_SetSequencerEvent(), and XAdcPs_SetSingleChParams().
#define XADCPS_CFR1_ALM_ALL_MASK 0x0F0F |
#include <xadcps_hw.h>
Mask for all alarms.
Referenced by XAdcPs_GetAlarmEnables(), and XAdcPs_SetAlarmEnables().
#define XADCPS_CFR1_ALM_TEMP_MASK 0x0002 |
#include <xadcps_hw.h>
Alarm 0 - Temperature.
#define XADCPS_CFR1_ALM_VBRAM_MASK 0x0100 |
#include <xadcps_hw.h>
Alm 3 - VBRAM, 7 series.
#define XADCPS_CFR1_ALM_VCCAUX_MASK 0x0008 |
#include <xadcps_hw.h>
Alarm 2 - VCCAUX Enable.
#define XADCPS_CFR1_ALM_VCCINT_MASK 0x0004 |
#include <xadcps_hw.h>
Alarm 1 - VCCINT Enable.
#define XADCPS_CFR1_ALM_VCCPAUX_MASK 0x0400 |
#include <xadcps_hw.h>
Alm 5 - VCCPAUX, Zynq.
#define XADCPS_CFR1_ALM_VCCPDRO_MASK 0x0800 |
#include <xadcps_hw.h>
Alm 6 - VCCPDRO, Zynq.
#define XADCPS_CFR1_ALM_VCCPINT_MASK 0x0200 |
#include <xadcps_hw.h>
Alm 4 - VCCPINT, Zynq.
#define XADCPS_CFR1_CAL_ADC_GAIN_OFFSET_MASK 0x0020 |
#include <xadcps_hw.h>
Calibration 1 -ADC Gain Offset Enable.
#define XADCPS_CFR1_CAL_ADC_OFFSET_MASK 0x0010 |
#define XADCPS_CFR1_CAL_DISABLE_MASK 0x0000 |
#define XADCPS_CFR1_CAL_PS_GAIN_OFFSET_MASK 0x0080 |
#include <xadcps_hw.h>
Calibration 3 -Power Supply Gain/Offset Enable.
#define XADCPS_CFR1_CAL_PS_OFFSET_MASK 0x0040 |
#include <xadcps_hw.h>
Calibration 2 -Power Supply Offset Enable.
#define XADCPS_CFR1_CAL_VALID_MASK 0x00F0 |
#include <xadcps_hw.h>
Valid Calibration Mask.
Referenced by XAdcPs_GetCalibEnables(), and XAdcPs_SetCalibEnables().
#define XADCPS_CFR1_OFFSET 0x41 |
#include <xadcps_hw.h>
Configuration Register 1.
Referenced by XAdcPs_GetAlarmEnables(), XAdcPs_GetCalibEnables(), XAdcPs_GetSequencerMode(), XAdcPs_SetAlarmEnables(), XAdcPs_SetCalibEnables(), and XAdcPs_SetSequencerMode().
#define XADCPS_CFR1_OT_MASK 0x0001 |
#include <xadcps_hw.h>
Over Temperature Enable.
#define XADCPS_CFR1_SEQ_CONTINPASS_MASK 0x2000 |
#include <xadcps_hw.h>
Continuous Cycling Seq.
#define XADCPS_CFR1_SEQ_INDEPENDENT_MASK 0x8000 |
#include <xadcps_hw.h>
Independent Mode.
#define XADCPS_CFR1_SEQ_ONEPASS_MASK 0x1000 |
#include <xadcps_hw.h>
Onepass through Seq.
#define XADCPS_CFR1_SEQ_SAFEMODE_MASK 0x0000 |
#include <xadcps_hw.h>
Default Safe Mode.
#define XADCPS_CFR1_SEQ_SHIFT 12 |
#include <xadcps_hw.h>
Sequence bit shift.
Referenced by XAdcPs_GetSequencerMode(), and XAdcPs_SetSequencerMode().
#define XADCPS_CFR1_SEQ_SIMUL_SAMPLING_MASK 0x4000 |
#include <xadcps_hw.h>
Simulataneous Sampling Mask.
#define XADCPS_CFR1_SEQ_SINGCHAN_MASK 0x3000 |
#include <xadcps_hw.h>
Single channel - No Seq.
#define XADCPS_CFR1_SEQ_VALID_MASK 0xF000 |
#include <xadcps_hw.h>
Sequence bit Mask.
Referenced by XAdcPs_GetSequencerMode(), and XAdcPs_SetSequencerMode().
#define XADCPS_CFR2_CD_MAX 255 |
#include <xadcps_hw.h>
Maximum value of divisor.
#define XADCPS_CFR2_CD_MIN 8 |
#include <xadcps_hw.h>
Minimum value of divisor.
#define XADCPS_CFR2_CD_MIN 8 |
#include <xadcps_hw.h>
Minimum value of divisor.
#define XADCPS_CFR2_CD_SHIFT 8 |
#include <xadcps_hw.h>
Num of shift on division.
Referenced by XAdcPs_GetAdcClkDivisor(), and XAdcPs_SetAdcClkDivisor().
#define XADCPS_CFR2_CD_VALID_MASK 0xFF00 |
#include <xadcps_hw.h>
Clock Divisor bit Mask.
#define XADCPS_CFR2_OFFSET 0x42 |
#include <xadcps_hw.h>
Configuration Register 2.
Referenced by XAdcPs_GetAdcClkDivisor(), XAdcPs_GetPowerdownMode(), XAdcPs_SetAdcClkDivisor(), and XAdcPs_SetPowerdownMode().
#define XADCPS_CFR2_PD_ADC1_MASK 0x0020 |
#include <xadcps_hw.h>
Power Down ADC1 Mask.
#define XADCPS_CFR2_PD_MASK 0x0030 |
#include <xadcps_hw.h>
Power Down Mask.
Referenced by XAdcPs_GetPowerdownMode(), and XAdcPs_SetPowerdownMode().
#define XADCPS_CFR2_PD_SHIFT 4 |
#include <xadcps_hw.h>
Power Down Shift.
Referenced by XAdcPs_GetPowerdownMode(), and XAdcPs_SetPowerdownMode().
#define XADCPS_CFR2_PD_XADC_MASK 0x0030 |
#include <xadcps_hw.h>
Power Down XADC Mask.
#define XADCPS_CH_ADC_CALIB 0x08 |
#define XADCPS_CH_AUX_MAX 31 |
#include <xadcps.h>
Channel number for Last Aux channel.
Referenced by XAdcPs_GetAdcData(), and XAdcPs_SetSingleChParams().
#define XADCPS_CH_AUX_MIN 16 |
#define XADCPS_CH_GAINERR_CALIB 0x09 |
#include <xadcps.h>
Gain Error Channel Reg.
#define XADCPS_CH_SUPPLY_CALIB 0x07 |
#include <xadcps.h>
Supply Calib Data Reg.
#define XADCPS_CH_TEMP 0x0 |
#define XADCPS_CH_VBRAM 0x6 |
#include <xadcps.h>
On-chip VBRAM Data Reg, 7 series.
Referenced by XAdcPs_GetAdcData(), and XAdcPs_SetSingleChParams().
#define XADCPS_CH_VCCAUX 0x2 |
#include <xadcps.h>
VCCAUX.
#define XADCPS_CH_VCCINT 0x1 |
#include <xadcps.h>
VCCINT.
#define XADCPS_CH_VCCPAUX 0x0E |
#define XADCPS_CH_VCCPDRO 0x0F |
#include <xadcps.h>
On-chip PS VCCPDRO Channel , Zynq.
#define XADCPS_CH_VCCPINT 0x0D |
#include <xadcps.h>
On-chip PS VCCPINT Channel , Zynq.
Referenced by XAdcPs_GetAdcData(), and XAdcPs_SetSingleChParams().
#define XADCPS_CH_VPVN 0x3 |
#define XADCPS_CH_VREFN 0x5 |
#include <xadcps.h>
VREFN.
#define XADCPS_CH_VREFP 0x4 |
#include <xadcps.h>
VREFP.
#define XADCPS_CMDFIFO_OFFSET 0x10 |
#include <xadcps_hw.h>
Command FIFO Register.
#define XADCPS_FLAG_OFFSET 0x3F |
#include <xadcps_hw.h>
Flag Register.
#define XAdcPs_FormatWriteData | ( | RegOffset, | |
Data, | |||
ReadWrite | |||
) |
#include <xadcps_hw.h>
Formats the data to be written to the the XADC registers.
RegOffset | is the offset of the Register |
Data | is the data to be written to the Register if it is a write. |
ReadWrite | specifies whether it is a Read or a Write. Use 0 for Read, 1 for Write. |
Referenced by XAdcPs_ReadInternalReg(), and XAdcPs_WriteInternalReg().
#define XADCPS_INT_MASK_OFFSET 0x08 |
#include <xadcps_hw.h>
Interrupt Mask Register.
Referenced by XAdcPs_IntrDisable(), XAdcPs_IntrEnable(), and XAdcPs_IntrGetEnabled().
#define XADCPS_INT_STS_OFFSET 0x04 |
#include <xadcps_hw.h>
Interrupt Status Register.
Referenced by XAdcPs_IntrClear(), and XAdcPs_IntrGetStatus().
#define XADCPS_INTX_ALL_MASK 0x000003FF |
#include <xadcps_hw.h>
Alarm Signals Mask.
Referenced by XAdcPs_IntrClear(), XAdcPs_IntrDisable(), XAdcPs_IntrEnable(), XAdcPs_IntrGetEnabled(), and XAdcPs_IntrGetStatus().
#define XADCPS_INTX_ALM0_MASK 0x00000001 |
#include <xadcps_hw.h>
Alarm 0 Mask.
#define XADCPS_INTX_ALM1_MASK 0x00000002 |
#include <xadcps_hw.h>
Alarm 1 Mask.
#define XADCPS_INTX_ALM2_MASK 0x00000004 |
#include <xadcps_hw.h>
Alarm 2 Mask.
#define XADCPS_INTX_ALM3_MASK 0x00000008 |
#include <xadcps_hw.h>
Alarm 3 Mask.
#define XADCPS_INTX_ALM4_MASK 0x00000010 |
#include <xadcps_hw.h>
Alarm 4 Mask.
#define XADCPS_INTX_ALM5_MASK 0x00000020 |
#include <xadcps_hw.h>
Alarm 5 Mask.
#define XADCPS_INTX_ALM6_MASK 0x00000040 |
#include <xadcps_hw.h>
Alarm 6 Mask.
#define XADCPS_INTX_ALM_ALL_MASK 0x0000007F |
#include <xadcps_hw.h>
Alarm Signals Mask.
#define XADCPS_INTX_CFIFO_LTH_MASK 0x00000200 |
#include <xadcps_hw.h>
CMD FIFO less than threshold.
#define XADCPS_INTX_DFIFO_GTH_MASK 0x00000100 |
#include <xadcps_hw.h>
Data FIFO greater than threshold.
#define XADCPS_INTX_OT_MASK 0x00000080 |
#include <xadcps_hw.h>
Over temperature Alarm Status.
#define XAdcPs_IsEventSamplingModeSet | ( | InstancePtr | ) |
#include <xadcps.h>
This macro checks if the XADC device is in Event Sampling mode.
InstancePtr | is a pointer to the XAdcPs instance. |
#define XAdcPs_IsExternalMuxModeSet | ( | InstancePtr | ) |
#include <xadcps.h>
This macro checks if the XADC device is in External Mux mode.
InstancePtr | is a pointer to the XAdcPs instance. |
#define XADCPS_JTAG_ADDR_MASK 0x03FF0000 |
#include <xadcps_hw.h>
Mask for the Addr.
#define XADCPS_JTAG_ADDR_SHIFT 16 |
#include <xadcps_hw.h>
Shift for the Addr.
#define XADCPS_JTAG_CMD_MASK 0x3C000000 |
#include <xadcps_hw.h>
Mask for the Cmd.
#define XADCPS_JTAG_CMD_READ_MASK 0x04000000 |
#include <xadcps_hw.h>
Mask for CMD Read.
#define XADCPS_JTAG_CMD_SHIFT 26 |
#include <xadcps_hw.h>
Shift for the Cmd.
#define XADCPS_JTAG_CMD_WRITE_MASK 0x08000000 |
#include <xadcps_hw.h>
Mask for CMD Write.
#define XADCPS_JTAG_DATA_MASK 0x0000FFFF |
#include <xadcps_hw.h>
Mask for the Data.
#define XADCPS_MAX_TEMP 0 |
#include <xadcps.h>
Maximum Temperature Data.
#define XADCPS_MAX_TEMP_OFFSET 0x20 |
#define XADCPS_MAX_VBRAM 3 |
#include <xadcps.h>
Maximum VBRAM Data.
#define XADCPS_MAX_VCCAUX 2 |
#include <xadcps.h>
Maximum VCCAUX Data.
#define XADCPS_MAX_VCCAUX_OFFSET 0x22 |
#include <xadcps_hw.h>
Max VCCAUX Register.
#define XADCPS_MAX_VCCBRAM_OFFSET 0x23 |
#include <xadcps_hw.h>
Max BRAM Register, 7 series.
#define XADCPS_MAX_VCCINT 1 |
#include <xadcps.h>
Maximum VCCINT Data.
#define XADCPS_MAX_VCCINT_OFFSET 0x21 |
#include <xadcps_hw.h>
Max VCCINT Register.
#define XADCPS_MAX_VCCPAUX 9 |
#include <xadcps.h>
Maximum VCCPAUX Register , Zynq.
#define XADCPS_MAX_VCCPAUX_OFFSET 0x29 |
#include <xadcps_hw.h>
Max VCCPAUX Register, Zynq.
#define XADCPS_MAX_VCCPDRO 0xA |
#define XADCPS_MAX_VCCPDRO_OFFSET 0x2A |
#include <xadcps_hw.h>
Max VCCPDRO Register, Zynq.
#define XADCPS_MAX_VCCPINT 8 |
#include <xadcps.h>
Maximum VCCPINT Register , Zynq.
#define XADCPS_MAX_VCCPINT_OFFSET 0x28 |
#include <xadcps_hw.h>
Max VCCPINT Register, Zynq.
#define XADCPS_MCTL_FLUSH_MASK 0x00000001 |
#include <xadcps_hw.h>
Flush the FIFOs.
#define XADCPS_MCTL_OFFSET 0x18 |
#include <xadcps_hw.h>
Misc control register.
Referenced by XAdcPs_CfgInitialize(), XAdcPs_GetMiscCtrlRegister(), XAdcPs_Reset(), and XAdcPs_SetMiscCtrlRegister().
#define XADCPS_MCTL_RESET_MASK 0x00000010 |
#include <xadcps_hw.h>
Reset XADC.
#define XADCPS_MIN_TEMP 4 |
#include <xadcps.h>
Minimum Temperature Data.
#define XADCPS_MIN_TEMP_OFFSET 0x24 |
#include <xadcps_hw.h>
Min Temperature Reg.
#define XADCPS_MIN_VBRAM 7 |
#include <xadcps.h>
Minimum VBRAM Data.
#define XADCPS_MIN_VCCAUX 6 |
#include <xadcps.h>
Minimum VCCAUX Data.
#define XADCPS_MIN_VCCAUX_OFFSET 0x26 |
#include <xadcps_hw.h>
Min VCCAUX Register.
#define XADCPS_MIN_VCCBRAM_OFFSET 0x27 |
#include <xadcps_hw.h>
Min BRAM Register, 7 series.
#define XADCPS_MIN_VCCINT 5 |
#include <xadcps.h>
Minimum VCCINT Data.
#define XADCPS_MIN_VCCINT_OFFSET 0x25 |
#include <xadcps_hw.h>
Min VCCINT Register.
#define XADCPS_MIN_VCCPAUX 0xD |
#include <xadcps.h>
Minimum VCCPAUX Register , Zynq.
#define XADCPS_MIN_VCCPAUX_OFFSET 0x2D |
#include <xadcps_hw.h>
Min VCCPAUX Register, Zynq.
#define XADCPS_MIN_VCCPDRO 0xE |
#define XADCPS_MIN_VCCPDRO_OFFSET 0x2E |
#include <xadcps_hw.h>
Min VCCPDRO Register,Zynq.
#define XADCPS_MIN_VCCPINT 0xC |
#define XADCPS_MIN_VCCPINT_OFFSET 0x2C |
#include <xadcps_hw.h>
Min VCCPINT Register, Zynq.
#define XADCPS_MSTS_ALM_MASK 0x0000007F |
#include <xadcps_hw.h>
Alarms Mask.
#define XADCPS_MSTS_CFIFO_LVL_MASK 0x000F0000 |
#include <xadcps_hw.h>
Command FIFO Level mask.
#define XADCPS_MSTS_CFIFOE_MASK 0x00000400 |
#include <xadcps_hw.h>
Command FIFO Empty Mask.
#define XADCPS_MSTS_CFIFOF_MASK 0x00000800 |
#include <xadcps_hw.h>
Command FIFO Full Mask.
#define XADCPS_MSTS_DFIFO_LVL_MASK 0x0000F000 |
#include <xadcps_hw.h>
Data FIFO Level Mask.
#define XADCPS_MSTS_DFIFOE_MASK 0x00000100 |
#include <xadcps_hw.h>
Data FIFO Empty Mask.
#define XADCPS_MSTS_DFIFOF_MASK 0x00000200 |
#include <xadcps_hw.h>
Data FIFO Full Mask.
#define XADCPS_MSTS_OFFSET 0x0C |
#define XADCPS_MSTS_OT_MASK 0x00000080 |
#include <xadcps_hw.h>
Over Temperature Mask.
#define XADCPS_PD_MODE_ADCB 1 |
#include <xadcps.h>
Power Down ADC B.
#define XADCPS_PD_MODE_NONE 0 |
#include <xadcps.h>
No Power Down.
#define XADCPS_PD_MODE_XADC 2 |
#define XAdcPs_RawToTemperature | ( | AdcData | ) | ((((float)(AdcData)/65536.0f)/0.00198421639f ) - 273.15f) |
#include <xadcps.h>
This macro converts XADC Raw Data to Temperature(centigrades).
AdcData | is the Raw ADC Data from XADC. |
#define XAdcPs_RawToVoltage | ( | AdcData | ) | ((((float)(AdcData))* (3.0f))/65536.0f) |
#include <xadcps.h>
This macro converts XADC/ADC Raw Data to Voltage(volts).
AdcData | is the XADC/ADC Raw Data. |
#define XADCPS_RDFIFO_OFFSET 0x14 |
#include <xadcps_hw.h>
Read FIFO Register.
#define XAdcPs_ReadFifo | ( | InstancePtr | ) |
#include <xadcps.h>
This macro is used for reading from the XADC Registers using the data FIFO.
InstancePtr | is a pointer to the XAdcPs instance. |
Referenced by XAdcPs_ReadInternalReg(), and XAdcPs_WriteInternalReg().
#define XAdcPs_ReadReg | ( | BaseAddress, | |
RegOffset | |||
) | (Xil_In32((BaseAddress) + (RegOffset))) |
#include <xadcps_hw.h>
Read a register of the XADC device.
This macro provides register access to all registers using the register offsets defined above.
BaseAddress | contains the base address of the device. |
RegOffset | is the offset of the register to read. |
Referenced by XAdcPs_CfgInitialize(), XAdcPs_GetConfigRegister(), XAdcPs_GetMiscCtrlRegister(), XAdcPs_GetMiscStatus(), XAdcPs_IntrClear(), XAdcPs_IntrDisable(), XAdcPs_IntrEnable(), XAdcPs_IntrGetEnabled(), and XAdcPs_IntrGetStatus().
#define XADCPS_SEQ00_CH_VALID_MASK 0x7FE1 |
#include <xadcps_hw.h>
Mask for the valid channels.
Referenced by XAdcPs_GetSeqChEnables(), and XAdcPs_SetSeqChEnables().
#define XADCPS_SEQ00_OFFSET 0x48 |
#include <xadcps_hw.h>
Seq Reg 00 Adc Channel Selection.
Referenced by XAdcPs_GetSeqChEnables(), and XAdcPs_SetSeqChEnables().
#define XADCPS_SEQ01_CH_VALID_MASK 0xFFFF |
#include <xadcps_hw.h>
Mask for the valid channels.
Referenced by XAdcPs_GetSeqChEnables(), and XAdcPs_SetSeqChEnables().
#define XADCPS_SEQ01_OFFSET 0x49 |
#include <xadcps_hw.h>
Seq Reg 01 Adc Channel Selection.
Referenced by XAdcPs_GetSeqChEnables(), and XAdcPs_SetSeqChEnables().
#define XADCPS_SEQ02_CH_VALID_MASK 0x7FE0 |
#include <xadcps_hw.h>
Mask for the valid channels.
Referenced by XAdcPs_GetSeqAvgEnables(), and XAdcPs_SetSeqAvgEnables().
#define XADCPS_SEQ02_OFFSET 0x4A |
#include <xadcps_hw.h>
Seq Reg 02 Adc Average Enable.
Referenced by XAdcPs_GetSeqAvgEnables(), and XAdcPs_SetSeqAvgEnables().
#define XADCPS_SEQ03_CH_VALID_MASK 0xFFFF |
#include <xadcps_hw.h>
Mask for the valid channels.
Referenced by XAdcPs_GetSeqAvgEnables(), and XAdcPs_SetSeqAvgEnables().
#define XADCPS_SEQ03_OFFSET 0x4B |
#include <xadcps_hw.h>
Seq Reg 03 Adc Average Enable.
Referenced by XAdcPs_GetSeqAvgEnables(), and XAdcPs_SetSeqAvgEnables().
#define XADCPS_SEQ04_CH_VALID_MASK 0x0800 |
#include <xadcps_hw.h>
Mask for the valid channels.
Referenced by XAdcPs_GetSeqInputMode(), and XAdcPs_SetSeqInputMode().
#define XADCPS_SEQ04_OFFSET 0x4C |
#include <xadcps_hw.h>
Seq Reg 04 Adc Input Mode Select.
Referenced by XAdcPs_GetSeqInputMode(), and XAdcPs_SetSeqInputMode().
#define XADCPS_SEQ05_CH_VALID_MASK 0xFFFF |
#include <xadcps_hw.h>
Mask for the valid channels.
Referenced by XAdcPs_GetSeqInputMode(), and XAdcPs_SetSeqInputMode().
#define XADCPS_SEQ05_OFFSET 0x4D |
#include <xadcps_hw.h>
Seq Reg 05 Adc Input Mode Select.
Referenced by XAdcPs_GetSeqInputMode(), and XAdcPs_SetSeqInputMode().
#define XADCPS_SEQ06_CH_VALID_MASK 0x0800 |
#include <xadcps_hw.h>
Mask for the valid channels.
Referenced by XAdcPs_GetSeqAcqTime(), and XAdcPs_SetSeqAcqTime().
#define XADCPS_SEQ06_OFFSET 0x4E |
#include <xadcps_hw.h>
Seq Reg 06 Adc Acquisition Select.
Referenced by XAdcPs_GetSeqAcqTime(), and XAdcPs_SetSeqAcqTime().
#define XADCPS_SEQ07_CH_VALID_MASK 0xFFFF |
#include <xadcps_hw.h>
Mask for the valid channels.
Referenced by XAdcPs_GetSeqAcqTime(), and XAdcPs_SetSeqAcqTime().
#define XADCPS_SEQ07_OFFSET 0x4F |
#include <xadcps_hw.h>
Seq Reg 07 Adc Acquisition Select.
Referenced by XAdcPs_GetSeqAcqTime(), and XAdcPs_SetSeqAcqTime().
#define XADCPS_SEQ_CH_AUX00 0x00010000 |
#include <xadcps_hw.h>
1st Aux Channel
#define XADCPS_SEQ_CH_AUX01 0x00020000 |
#include <xadcps_hw.h>
2nd Aux Channel
#define XADCPS_SEQ_CH_AUX02 0x00040000 |
#include <xadcps_hw.h>
3rd Aux Channel
#define XADCPS_SEQ_CH_AUX03 0x00080000 |
#include <xadcps_hw.h>
4th Aux Channel
#define XADCPS_SEQ_CH_AUX04 0x00100000 |
#include <xadcps_hw.h>
5th Aux Channel
#define XADCPS_SEQ_CH_AUX05 0x00200000 |
#include <xadcps_hw.h>
6th Aux Channel
#define XADCPS_SEQ_CH_AUX06 0x00400000 |
#include <xadcps_hw.h>
7th Aux Channel
#define XADCPS_SEQ_CH_AUX07 0x00800000 |
#include <xadcps_hw.h>
8th Aux Channel
#define XADCPS_SEQ_CH_AUX08 0x01000000 |
#include <xadcps_hw.h>
9th Aux Channel
#define XADCPS_SEQ_CH_AUX09 0x02000000 |
#include <xadcps_hw.h>
10th Aux Channel
#define XADCPS_SEQ_CH_AUX10 0x04000000 |
#include <xadcps_hw.h>
11th Aux Channel
#define XADCPS_SEQ_CH_AUX11 0x08000000 |
#include <xadcps_hw.h>
12th Aux Channel
#define XADCPS_SEQ_CH_AUX12 0x10000000 |
#include <xadcps_hw.h>
13th Aux Channel
#define XADCPS_SEQ_CH_AUX13 0x20000000 |
#include <xadcps_hw.h>
14th Aux Channel
#define XADCPS_SEQ_CH_AUX14 0x40000000 |
#include <xadcps_hw.h>
15th Aux Channel
#define XADCPS_SEQ_CH_AUX15 0x80000000 |
#include <xadcps_hw.h>
16th Aux Channel
#define XADCPS_SEQ_CH_AUX_SHIFT 16 |
#include <xadcps_hw.h>
Shift for the Aux Channel.
Referenced by XAdcPs_GetSeqAcqTime(), XAdcPs_GetSeqAvgEnables(), XAdcPs_GetSeqChEnables(), XAdcPs_GetSeqInputMode(), XAdcPs_SetSeqAcqTime(), XAdcPs_SetSeqAvgEnables(), XAdcPs_SetSeqChEnables(), and XAdcPs_SetSeqInputMode().
#define XADCPS_SEQ_CH_CALIB 0x00000001 |
#include <xadcps_hw.h>
ADC Calibration Channel.
#define XADCPS_SEQ_CH_TEMP 0x00000100 |
#include <xadcps_hw.h>
On Chip Temperature Channel.
#define XADCPS_SEQ_CH_VBRAM 0x00004000 |
#include <xadcps_hw.h>
VBRAM Channel, 7 series.
#define XADCPS_SEQ_CH_VCCAUX 0x00000400 |
#include <xadcps_hw.h>
VCCAUX Channel.
#define XADCPS_SEQ_CH_VCCINT 0x00000200 |
#include <xadcps_hw.h>
VCCINT Channel.
#define XADCPS_SEQ_CH_VCCPAUX 0x00000040 |
#include <xadcps_hw.h>
VCCPAUX, Zynq Only.
#define XADCPS_SEQ_CH_VCCPDRO 0x00000080 |
#include <xadcps_hw.h>
VCCPDRO, Zynq Only.
#define XADCPS_SEQ_CH_VCCPINT 0x00000020 |
#include <xadcps_hw.h>
VCCPINT, Zynq Only.
#define XADCPS_SEQ_CH_VPVN 0x00000800 |
#include <xadcps_hw.h>
VP/VN analog inputs Channel.
#define XADCPS_SEQ_CH_VREFN 0x00002000 |
#include <xadcps_hw.h>
VREFN Channel.
#define XADCPS_SEQ_CH_VREFP 0x00001000 |
#include <xadcps_hw.h>
VREFP Channel.
#define XADCPS_SEQ_MODE_CONTINPASS 2 |
#include <xadcps.h>
Continuous Cycling Sequencer.
#define XADCPS_SEQ_MODE_INDEPENDENT 8 |
#define XADCPS_SEQ_MODE_ONEPASS 1 |
#include <xadcps.h>
Onepass through Sequencer.
#define XADCPS_SEQ_MODE_SAFE 0 |
#include <xadcps.h>
Default Safe Mode.
Referenced by XAdcIntrExample(), XAdcPs_SetSeqAcqTime(), XAdcPs_SetSeqAvgEnables(), XAdcPs_SetSeqChEnables(), and XAdcPs_SetSeqInputMode().
#define XADCPS_SEQ_MODE_SIMUL_SAMPLING 4 |
#define XADCPS_SEQ_MODE_SINGCHAN 3 |
#define XADCPS_TEMP_OFFSET 0x00 |
#define XAdcPs_TemperatureToRaw | ( | Temperature | ) | ((int)(((Temperature) + 273.15f)*65536.0f*0.00198421639f)) |
#include <xadcps.h>
This macro converts Temperature in centigrades to XADC/ADC Raw Data.
Temperature | is the Temperature in centigrades to be converted to XADC/ADC Raw Data. |
#define XADCPS_UNLK_OFFSET 0x034 |
#define XADCPS_UNLK_VALUE 0x757BDF0D |
#define XADCPS_VBRAM_OFFSET 0x06 |
#include <xadcps_hw.h>
On-chip VBRAM , 7 Series.
#define XADCPS_VCCAUX_OFFSET 0x02 |
#include <xadcps_hw.h>
On-chip VCCAUX Data Reg.
#define XADCPS_VCCINT_OFFSET 0x01 |
#include <xadcps_hw.h>
On-chip VCCINT Data Reg.
#define XADCPS_VCCPAUX_OFFSET 0x0E |
#include <xadcps_hw.h>
On-chip VCCPAUX Reg, Zynq.
#define XADCPS_VCCPDRO_OFFSET 0x0F |
#include <xadcps_hw.h>
On-chip VCCPDRO Reg, Zynq.
#define XADCPS_VCCPINT_OFFSET 0x0D |
#include <xadcps_hw.h>
On-chip VCCPINT Reg, Zynq.
#define XAdcPs_VoltageToRaw | ( | Voltage | ) | ((int)((Voltage)*65536.0f/3.0f)) |
#include <xadcps.h>
This macro converts Voltage in Volts to XADC/ADC Raw Data.
Voltage | is the Voltage in volts to be converted to XADC/ADC Raw Data. |
#define XADCPS_VPVN_OFFSET 0x03 |
#include <xadcps_hw.h>
ADC out of VP/VN.
#define XADCPS_VREFN_OFFSET 0x05 |
#include <xadcps_hw.h>
On-chip VREFN Data Reg.
#define XADCPS_VREFP_OFFSET 0x04 |
#include <xadcps_hw.h>
On-chip VREFP Data Reg.
#define XAdcPs_WriteFifo | ( | InstancePtr, | |
Data | |||
) |
#include <xadcps.h>
This macro is used for writing to the XADC Registers using the command FIFO.
InstancePtr | is a pointer to the XAdcPs instance. |
Referenced by XAdcPs_ReadInternalReg(), and XAdcPs_WriteInternalReg().
#define XAdcPs_WriteReg | ( | BaseAddress, | |
RegOffset, | |||
Data | |||
) | (Xil_Out32((BaseAddress) + (RegOffset), (Data))) |
#include <xadcps_hw.h>
Write a register of the XADC device.
This macro provides register access to all registers using the register offsets defined above.
BaseAddress | contains the base address of the device. |
RegOffset | is the offset of the register to write. |
Data | is the value to write to the register. |
Referenced by XAdcPs_CfgInitialize(), XAdcPs_IntrClear(), XAdcPs_IntrDisable(), XAdcPs_IntrEnable(), XAdcPs_Reset(), XAdcPs_SetConfigRegister(), and XAdcPs_SetMiscCtrlRegister().
int XAdcPs_CfgInitialize | ( | XAdcPs * | InstancePtr, |
XAdcPs_Config * | ConfigPtr, | ||
u32 | EffectiveAddr | ||
) |
#include <xadcps.c>
This function initializes a specific XAdcPs device/instance.
Functions in xadcps.c.
This function must be called prior to using the XADC device.
InstancePtr | is a pointer to the XAdcPs instance. |
ConfigPtr | points to the XAdcPs 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 XAdcPs_Config::BaseAddress, XAdcPs::Config, XAdcPs_Config::DeviceId, XAdcPs::IsReady, XADCPS_CFG_CFIFOTH_MASK, XADCPS_CFG_DFIFOTH_MASK, XADCPS_CFG_ENABLE_MASK, XADCPS_CFG_OFFSET, XADCPS_MCTL_OFFSET, XAdcPs_ReadReg, XADCPS_UNLK_OFFSET, XADCPS_UNLK_VALUE, and XAdcPs_WriteReg.
Referenced by XAdcIntrExample().
void XAdcPs_DisableUserOverTemp | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
This function disables programming of the powerdown temperature for the OverTemp signal in the OT Powerdown register.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_ATR_OT_UPPER_ENB_MASK, XADCPS_ATR_OT_UPPER_OFFSET, XAdcPs_ReadInternalReg(), and XAdcPs_WriteInternalReg().
void XAdcPs_EnableUserOverTemp | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
This function enables programming of the powerdown temperature for the OverTemp signal in the OT Powerdown register.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_ATR_OT_UPPER_ENB_MASK, XADCPS_ATR_OT_UPPER_ENB_VAL, XADCPS_ATR_OT_UPPER_OFFSET, XAdcPs_ReadInternalReg(), and XAdcPs_WriteInternalReg().
u8 XAdcPs_GetAdcClkDivisor | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
The function gets the ADCCLK divisor from the Configuration Register 2.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_CFR2_CD_SHIFT, XADCPS_CFR2_OFFSET, and XAdcPs_ReadInternalReg().
u16 XAdcPs_GetAdcData | ( | XAdcPs * | InstancePtr, |
u8 | Channel | ||
) |
#include <xadcps.c>
Get the ADC converted data for the specified channel.
InstancePtr | is a pointer to the XAdcPs instance. |
Channel | is the channel number. Use the XADCPS_CH_* defined in the file xadcps.h. The valid channels are
|
References XAdcPs::IsReady, XADCPS_CH_AUX_MAX, XADCPS_CH_VBRAM, XADCPS_CH_VCCPINT, XAdcPs_ReadInternalReg(), and XADCPS_TEMP_OFFSET.
Referenced by XAdcIntrExample().
u16 XAdcPs_GetAlarmEnables | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
This function gets the status of the alarm output enables in the Configuration Register 1.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_CFR1_ALM_ALL_MASK, XADCPS_CFR1_OFFSET, and XAdcPs_ReadInternalReg().
u16 XAdcPs_GetAlarmThreshold | ( | XAdcPs * | InstancePtr, |
u8 | AlarmThrReg | ||
) |
#include <xadcps.c>
This function returns the contents of the specified Alarm Threshold Register.
InstancePtr | is a pointer to the XAdcPs instance. |
AlarmThrReg | is the index of an Alarm Threshold Register to be read. Use XADCPS_ATR_* constants defined in xadcps_hw.h to specify the index. |
References XAdcPs::IsReady, XADCPS_ATR_TEMP_UPPER_OFFSET, XADCPS_ATR_VCCPDRO_LOWER, and XAdcPs_ReadInternalReg().
u8 XAdcPs_GetAvg | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
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 XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_CFR0_AVG_SHIFT, XADCPS_CFR0_AVG_VALID_MASK, XADCPS_CFR0_OFFSET, and XAdcPs_ReadInternalReg().
u16 XAdcPs_GetCalibCoefficient | ( | XAdcPs * | InstancePtr, |
u8 | CoeffType | ||
) |
#include <xadcps.c>
This function gets the calibration coefficient data for the specified parameter.
InstancePtr | is a pointer to the XAdcPs instance. |
CoeffType | specifies the calibration coefficient to be read. Use XADCPS_CALIB_* constants defined in xadcps.h to specify the calibration coefficient to be read. |
References XAdcPs::IsReady, XADCPS_ADC_A_SUPPLY_CALIB_OFFSET, XADCPS_CALIB_GAIN_ERROR_COEFF, and XAdcPs_ReadInternalReg().
u16 XAdcPs_GetCalibEnables | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
This function reads the value of the calibration enables from the Configuration Register 1.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_CFR1_CAL_VALID_MASK, XADCPS_CFR1_OFFSET, and XAdcPs_ReadInternalReg().
u32 XAdcPs_GetConfigRegister | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
The functions reads the contents of the Config Register.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_CFG_OFFSET, and XAdcPs_ReadReg.
u16 XAdcPs_GetMinMaxMeasurement | ( | XAdcPs * | InstancePtr, |
u8 | MeasurementType | ||
) |
#include <xadcps.c>
This function reads the Minimum/Maximum measurement for one of the specified parameters.
Use XADCPS_MAX_* and XADCPS_MIN_* constants defined in xadcps.h to specify the parameters (Temperature, VccInt, VccAux, VBram, VccPInt, VccPAux and VccPDro).
InstancePtr | is a pointer to the XAdcPs instance. |
MeasurementType | specifies the parameter for which the Minimum/Maximum measurement has to be read. Use XADCPS_MAX_* and XADCPS_MIN_* constants defined in xadcps.h to specify the data to be read. |
References XAdcPs::IsReady, XADCPS_MAX_TEMP_OFFSET, XADCPS_MAX_VCCPDRO, XADCPS_MIN_VCCPDRO, XADCPS_MIN_VCCPINT, and XAdcPs_ReadInternalReg().
u32 XAdcPs_GetMiscCtrlRegister | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
The functions reads the contents of the Miscellaneous control register.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_MCTL_OFFSET, and XAdcPs_ReadReg.
u32 XAdcPs_GetMiscStatus | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
The functions reads the contents of the Miscellaneous Status Register.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_MSTS_OFFSET, and XAdcPs_ReadReg.
u32 XAdcPs_GetPowerdownMode | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
This function gets the Power Down mode.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_CFR2_OFFSET, XADCPS_CFR2_PD_MASK, XADCPS_CFR2_PD_SHIFT, and XAdcPs_ReadInternalReg().
int XAdcPs_GetSamplingMode | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
This function returns the sampling mode.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_CFR0_EC_MASK, XADCPS_CFR0_OFFSET, and XAdcPs_ReadInternalReg().
u32 XAdcPs_GetSeqAcqTime | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
This function gets the status of acquisition from the ADC Channel Acquisition Time Sequencer Registers.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XAdcPs_ReadInternalReg(), XADCPS_SEQ06_CH_VALID_MASK, XADCPS_SEQ06_OFFSET, XADCPS_SEQ07_CH_VALID_MASK, XADCPS_SEQ07_OFFSET, and XADCPS_SEQ_CH_AUX_SHIFT.
u32 XAdcPs_GetSeqAvgEnables | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
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 XAdcPs instance. |
References XAdcPs::IsReady, XAdcPs_ReadInternalReg(), XADCPS_SEQ02_CH_VALID_MASK, XADCPS_SEQ02_OFFSET, XADCPS_SEQ03_CH_VALID_MASK, XADCPS_SEQ03_OFFSET, and XADCPS_SEQ_CH_AUX_SHIFT.
u32 XAdcPs_GetSeqChEnables | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
This function gets the channel enable bits status from the ADC Channel Selection Sequencer Registers.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XAdcPs_ReadInternalReg(), XADCPS_SEQ00_CH_VALID_MASK, XADCPS_SEQ00_OFFSET, XADCPS_SEQ01_CH_VALID_MASK, XADCPS_SEQ01_OFFSET, and XADCPS_SEQ_CH_AUX_SHIFT.
u32 XAdcPs_GetSeqInputMode | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
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 XAdcPs instance. |
References XAdcPs::IsReady, XAdcPs_ReadInternalReg(), XADCPS_SEQ04_CH_VALID_MASK, XADCPS_SEQ04_OFFSET, XADCPS_SEQ05_CH_VALID_MASK, XADCPS_SEQ05_OFFSET, and XADCPS_SEQ_CH_AUX_SHIFT.
u8 XAdcPs_GetSequencerMode | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
This function gets the channel sequencer mode from the Configuration Register 1.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_CFR1_OFFSET, XADCPS_CFR1_SEQ_SHIFT, XADCPS_CFR1_SEQ_VALID_MASK, and XAdcPs_ReadInternalReg().
Referenced by XAdcPs_SetSeqAcqTime(), XAdcPs_SetSeqAvgEnables(), XAdcPs_SetSeqChEnables(), XAdcPs_SetSeqInputMode(), and XAdcPs_SetSingleChParams().
void XAdcPs_IntrClear | ( | XAdcPs * | InstancePtr, |
u32 | Mask | ||
) |
#include <xadcps.h>
This function clears the specified interrupts in the Interrupt Status Register (IPISR).
InstancePtr | is a pointer to the XAdcPs instance. |
Mask | is the 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 XADCPS_IPIXR_* bits which are defined in xadcps_hw.h. |
References XAdcPs_Config::BaseAddress, XAdcPs::Config, XAdcPs::IsReady, XADCPS_INT_STS_OFFSET, XADCPS_INTX_ALL_MASK, XAdcPs_ReadReg, and XAdcPs_WriteReg.
void XAdcPs_IntrDisable | ( | XAdcPs * | InstancePtr, |
u32 | Mask | ||
) |
#include <xadcps.h>
This function disables the specified interrupts in the device.
InstancePtr | is a pointer to the XAdcPs instance. |
Mask | is the 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 XADCPS_INTX_* bits defined in xadcps_hw.h. |
References XAdcPs_Config::BaseAddress, XAdcPs::Config, XAdcPs::IsReady, XADCPS_INT_MASK_OFFSET, XADCPS_INTX_ALL_MASK, XAdcPs_ReadReg, and XAdcPs_WriteReg.
void XAdcPs_IntrEnable | ( | XAdcPs * | InstancePtr, |
u32 | Mask | ||
) |
#include <xadcps.h>
Functions in xadcps_intr.c.
This function enables the specified interrupts in the device.
InstancePtr | is a pointer to the XAdcPs instance. |
Mask | is the 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 XADCPS_INTX_* bits defined in xadcps_hw.h. |
References XAdcPs_Config::BaseAddress, XAdcPs::Config, XAdcPs::IsReady, XADCPS_INT_MASK_OFFSET, XADCPS_INTX_ALL_MASK, XAdcPs_ReadReg, and XAdcPs_WriteReg.
u32 XAdcPs_IntrGetEnabled | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.h>
This function returns the enabled interrupts read from the Interrupt Mask Register (IPIER).
Use the XADCPS_IPIXR_* constants defined in xadcps_hw.h to interpret the returned value.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs_Config::BaseAddress, XAdcPs::Config, XAdcPs::IsReady, XADCPS_INT_MASK_OFFSET, XADCPS_INTX_ALL_MASK, and XAdcPs_ReadReg.
u32 XAdcPs_IntrGetStatus | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.h>
This function returns the interrupt status read from Interrupt Status Register(IPISR).
Use the XADCPS_IPIXR_* constants defined in xadcps_hw.h to interpret the returned value.
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs_Config::BaseAddress, XAdcPs::Config, XAdcPs::IsReady, XADCPS_INT_STS_OFFSET, XADCPS_INTX_ALL_MASK, and XAdcPs_ReadReg.
XAdcPs_Config * XAdcPs_LookupConfig | ( | u16 | DeviceId | ) |
#include <xadcps.h>
Functions in xadcps_sinit.c.
This function looks up the device configuration based on the unique device ID.
The table XAdcPs_ConfigTable contains the configuration info for each device in the system.
DeviceId | contains the ID of the device for which the device configuration pointer is to be returned. |
Referenced by XAdcIntrExample().
u32 XAdcPs_ReadInternalReg | ( | XAdcPs * | InstancePtr, |
u32 | RegOffset | ||
) |
#include <xadcps.c>
This function is used for reading from the XADC Registers using the Data FIFO.
InstancePtr | is a pointer to the XAdcPs instance. |
RegOffset | is the offset of the XADC register to be read. |
References XAdcPs_FormatWriteData, XAdcPs_ReadFifo, and XAdcPs_WriteFifo.
Referenced by XAdcPs_DisableUserOverTemp(), XAdcPs_EnableUserOverTemp(), XAdcPs_GetAdcClkDivisor(), XAdcPs_GetAdcData(), XAdcPs_GetAlarmEnables(), XAdcPs_GetAlarmThreshold(), XAdcPs_GetAvg(), XAdcPs_GetCalibCoefficient(), XAdcPs_GetCalibEnables(), XAdcPs_GetMinMaxMeasurement(), XAdcPs_GetPowerdownMode(), XAdcPs_GetSamplingMode(), XAdcPs_GetSeqAcqTime(), XAdcPs_GetSeqAvgEnables(), XAdcPs_GetSeqChEnables(), XAdcPs_GetSeqInputMode(), XAdcPs_GetSequencerMode(), XAdcPs_SetAlarmEnables(), XAdcPs_SetAvg(), XAdcPs_SetCalibEnables(), XAdcPs_SetMuxMode(), XAdcPs_SetPowerdownMode(), XAdcPs_SetSequencerEvent(), XAdcPs_SetSequencerMode(), and XAdcPs_SetSingleChParams().
void XAdcPs_Reset | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.c>
This function resets the XADC Hard Macro in the device.
InstancePtr | is a pointer to the Xxadc instance. |
References XAdcPs::IsReady, XADCPS_MCTL_OFFSET, and XAdcPs_WriteReg.
Referenced by XAdcPs_SelfTest().
int XAdcPs_SelfTest | ( | XAdcPs * | InstancePtr | ) |
#include <xadcps.h>
Functions in xadcps_selftest.c.
Run a self-test on the driver/device.
The test
InstancePtr | is a pointer to the XAdcPs instance. |
References XAdcPs::IsReady, XADCPS_ATR_VCCINT_UPPER, XAdcPs_Reset(), and XAdcPs_SetAlarmThreshold().
Referenced by XAdcIntrExample().
void XAdcPs_SetAdcClkDivisor | ( | XAdcPs * | InstancePtr, |
u8 | Divisor | ||
) |
#include <xadcps.c>
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 XAdcPs instance. |
Divisor | is clock divisor used to derive ADCCLK from DCLK. Valid values of the divisor are
|
References XAdcPs::IsReady, XADCPS_CFR2_CD_SHIFT, XADCPS_CFR2_OFFSET, and XAdcPs_WriteInternalReg().
void XAdcPs_SetAlarmEnables | ( | XAdcPs * | InstancePtr, |
u16 | AlmEnableMask | ||
) |
#include <xadcps.c>
This function enables the alarm outputs for the specified alarms in the Configuration Register 1.
InstancePtr | is a pointer to the XAdcPs instance. |
AlmEnableMask | is the bit-mask of the alarm outputs to be enabled in the Configuration Register 1. Bit positions of 1 will be enabled. Bit positions of 0 will be disabled. This mask is formed by OR'ing XADCPS_CFR1_ALM_*_MASK and XADCPS_CFR1_OT_MASK masks defined in xadcps_hw.h. |
References XAdcPs::IsReady, XADCPS_CFR1_ALM_ALL_MASK, XADCPS_CFR1_OFFSET, XAdcPs_ReadInternalReg(), and XAdcPs_WriteInternalReg().
Referenced by XAdcIntrExample().
void XAdcPs_SetAlarmThreshold | ( | XAdcPs * | InstancePtr, |
u8 | AlarmThrReg, | ||
u16 | Value | ||
) |
#include <xadcps.c>
This functions sets the contents of the given Alarm Threshold Register.
InstancePtr | is a pointer to the XAdcPs instance. |
AlarmThrReg | is the index of an Alarm Threshold Register to be set. Use XADCPS_ATR_* constants defined in xadcps.h to specify the index. |
Value | is the 16-bit threshold value to write into the register. |
References XAdcPs::IsReady, XADCPS_ATR_TEMP_UPPER_OFFSET, XADCPS_ATR_VCCPDRO_LOWER, and XAdcPs_WriteInternalReg().
Referenced by XAdcIntrExample(), and XAdcPs_SelfTest().
void XAdcPs_SetAvg | ( | XAdcPs * | InstancePtr, |
u8 | Average | ||
) |
#include <xadcps.c>
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 XAdcPs instance. |
Average | is the number of samples of averaging programmed to the Configuration Register 0. Use the XADCPS_AVG_* definitions defined in xadcps.h file :
|
References XAdcPs::IsReady, XADCPS_AVG_256_SAMPLES, XADCPS_CFR0_AVG_SHIFT, XADCPS_CFR0_AVG_VALID_MASK, XADCPS_CFR0_OFFSET, XAdcPs_ReadInternalReg(), and XAdcPs_WriteInternalReg().
void XAdcPs_SetCalibEnables | ( | XAdcPs * | InstancePtr, |
u16 | Calibration | ||
) |
#include <xadcps.c>
This function enables the specified calibration in the Configuration Register 1 :
InstancePtr | is a pointer to the XAdcPs instance. |
Calibration | is the Calibration to be applied. Use XADCPS_CFR1_CAL*_* bits defined in xadcps_hw.h. Multiple calibrations can be enabled at a time by oring the XADCPS_CFR1_CAL_ADC_* and XADCPS_CFR1_CAL_PS_* bits. Calibration can be disabled by specifying XADCPS_CFR1_CAL_DISABLE_MASK; |
References XAdcPs::IsReady, XADCPS_CFR1_CAL_ADC_OFFSET_MASK, XADCPS_CFR1_CAL_DISABLE_MASK, XADCPS_CFR1_CAL_VALID_MASK, XADCPS_CFR1_OFFSET, XAdcPs_ReadInternalReg(), and XAdcPs_WriteInternalReg().
void XAdcPs_SetConfigRegister | ( | XAdcPs * | InstancePtr, |
u32 | Data | ||
) |
#include <xadcps.c>
The functions sets the contents of the Config Register.
InstancePtr | is a pointer to the XAdcPs instance. |
Data | is the 32 bit data to be written to the Register. |
References XAdcPs::IsReady, XADCPS_CFG_OFFSET, and XAdcPs_WriteReg.
void XAdcPs_SetMiscCtrlRegister | ( | XAdcPs * | InstancePtr, |
u32 | Data | ||
) |
#include <xadcps.c>
The functions sets the contents of the Miscellaneous Control register.
InstancePtr | is a pointer to the XAdcPs instance. |
Data | is the 32 bit data to be written to the Register. |
References XAdcPs::IsReady, XADCPS_MCTL_OFFSET, and XAdcPs_WriteReg.
void XAdcPs_SetMuxMode | ( | XAdcPs * | InstancePtr, |
int | MuxMode, | ||
u8 | Channel | ||
) |
#include <xadcps.c>
This function sets the External Mux mode.
InstancePtr | is a pointer to the XAdcPs instance. |
MuxMode | specifies whether External Mux is used
|
Channel | specifies the channel to be used for the external Mux. Please read the Device Spec for which channels are valid for which mode. |
References XAdcPs::IsReady, XADCPS_CFR0_CHANNEL_MASK, XADCPS_CFR0_MUX_MASK, XADCPS_CFR0_OFFSET, XAdcPs_ReadInternalReg(), and XAdcPs_WriteInternalReg().
void XAdcPs_SetPowerdownMode | ( | XAdcPs * | InstancePtr, |
u32 | Mode | ||
) |
#include <xadcps.c>
This function sets the Power Down mode.
InstancePtr | is a pointer to the XAdcPs instance. |
Mode | specifies the Power Down Mode
|
References XAdcPs::IsReady, XADCPS_CFR2_OFFSET, XADCPS_CFR2_PD_MASK, XADCPS_CFR2_PD_SHIFT, XADCPS_PD_MODE_XADC, XAdcPs_ReadInternalReg(), and XAdcPs_WriteInternalReg().
int XAdcPs_SetSeqAcqTime | ( | XAdcPs * | InstancePtr, |
u32 | AcqCyclesChMask | ||
) |
#include <xadcps.c>
This function sets the number of Acquisition cycles in the ADC Channel Acquisition Time Sequencer Registers.
The sequencer must be disabled before writing to these regsiters.
InstancePtr | is a pointer to the XAdcPs instance. |
AcqCyclesChMask | is the bit mask of all the channels for which the number of acquisition cycles is to be extended. Use XADCPS_SEQ_CH__* defined in xadcps_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 32 bit mask that is written to the two 16 bit ADC Channel Acquisition Time Sequencer Registers. |
References XAdcPs::IsReady, XAdcPs_GetSequencerMode(), XADCPS_SEQ06_CH_VALID_MASK, XADCPS_SEQ06_OFFSET, XADCPS_SEQ07_CH_VALID_MASK, XADCPS_SEQ07_OFFSET, XADCPS_SEQ_CH_AUX_SHIFT, XADCPS_SEQ_MODE_SAFE, and XAdcPs_WriteInternalReg().
int XAdcPs_SetSeqAvgEnables | ( | XAdcPs * | InstancePtr, |
u32 | AvgEnableChMask | ||
) |
#include <xadcps.c>
This function enables the averaging for the specified channels in the ADC Channel Averaging Enable Sequencer Registers.
The sequencer must be disabled before writing to these regsiters.
InstancePtr | is a pointer to the XAdcPs instance. |
AvgEnableChMask | is the bit mask of all the channels for which averaging is to be enabled. Use XADCPS_SEQ_CH__* defined in xadcps_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 32 bit mask that is written to the two 16 bit ADC Channel Averaging Enable Sequencer Registers. |
References XAdcPs::IsReady, XAdcPs_GetSequencerMode(), XADCPS_SEQ02_CH_VALID_MASK, XADCPS_SEQ02_OFFSET, XADCPS_SEQ03_CH_VALID_MASK, XADCPS_SEQ03_OFFSET, XADCPS_SEQ_CH_AUX_SHIFT, XADCPS_SEQ_MODE_SAFE, and XAdcPs_WriteInternalReg().
int XAdcPs_SetSeqChEnables | ( | XAdcPs * | InstancePtr, |
u32 | ChEnableMask | ||
) |
#include <xadcps.c>
This function enables the specified channels in the ADC Channel Selection Sequencer Registers.
The sequencer must be disabled before writing to these regsiters.
InstancePtr | is a pointer to the XAdcPs instance. |
ChEnableMask | is the bit mask of all the channels to be enabled. Use XADCPS_SEQ_CH__* defined in xadcps_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 32 bit mask that is written to the two 16 bit ADC Channel Selection Sequencer Registers. |
References XAdcPs::IsReady, XAdcPs_GetSequencerMode(), XADCPS_SEQ00_CH_VALID_MASK, XADCPS_SEQ00_OFFSET, XADCPS_SEQ01_CH_VALID_MASK, XADCPS_SEQ01_OFFSET, XADCPS_SEQ_CH_AUX_SHIFT, XADCPS_SEQ_MODE_SAFE, and XAdcPs_WriteInternalReg().
int XAdcPs_SetSeqInputMode | ( | XAdcPs * | InstancePtr, |
u32 | InputModeChMask | ||
) |
#include <xadcps.c>
This function sets the Analog input mode for the specified channels in the ADC Channel Analog-Input Mode Sequencer Registers.
The sequencer must be disabled before writing to these regsiters.
InstancePtr | is a pointer to the XAdcPs instance. |
InputModeChMask | is the bit mask of all the channels for which the input mode is differential mode. Use XADCPS_SEQ_CH__* defined in xadcps_hw.h to specify the channel numbers. Differential input mode will be set for bit masks of 1 and unipolar input mode for bit masks of 0. The InputModeChMask is a 32 bit mask that is written to the two 16 bit ADC Channel Analog-Input Mode Sequencer Registers. |
References XAdcPs::IsReady, XAdcPs_GetSequencerMode(), XADCPS_SEQ04_CH_VALID_MASK, XADCPS_SEQ04_OFFSET, XADCPS_SEQ05_CH_VALID_MASK, XADCPS_SEQ05_OFFSET, XADCPS_SEQ_CH_AUX_SHIFT, XADCPS_SEQ_MODE_SAFE, and XAdcPs_WriteInternalReg().
void XAdcPs_SetSequencerEvent | ( | XAdcPs * | InstancePtr, |
int | IsEventMode | ||
) |
#include <xadcps.c>
The function enables the Event mode or Continuous mode in the sequencer mode.
InstancePtr | is a pointer to the XAdcPs instance. |
IsEventMode | is a boolean parameter that specifies continuous sampling (specify FALSE) or event driven sampling mode (specify TRUE) for the given channel. |
References XAdcPs::IsReady, XADCPS_CFR0_EC_MASK, XADCPS_CFR0_OFFSET, XAdcPs_ReadInternalReg(), and XAdcPs_WriteInternalReg().
void XAdcPs_SetSequencerMode | ( | XAdcPs * | InstancePtr, |
u8 | SequencerMode | ||
) |
#include <xadcps.c>
This function sets the specified Channel Sequencer Mode in the Configuration Register 1 :
InstancePtr | is a pointer to the XAdcPs instance. |
SequencerMode | is the sequencer mode to be set. Use XADCPS_SEQ_MODE_* bits defined in xadcps.h. |
References XAdcPs::IsReady, XADCPS_CFR1_OFFSET, XADCPS_CFR1_SEQ_SHIFT, XADCPS_CFR1_SEQ_VALID_MASK, XAdcPs_ReadInternalReg(), XADCPS_SEQ_MODE_INDEPENDENT, XADCPS_SEQ_MODE_SIMUL_SAMPLING, and XAdcPs_WriteInternalReg().
Referenced by XAdcIntrExample().
int XAdcPs_SetSingleChParams | ( | XAdcPs * | InstancePtr, |
u8 | Channel, | ||
int | IncreaseAcqCycles, | ||
int | IsEventMode, | ||
int | IsDifferentialMode | ||
) |
#include <xadcps.c>
The function sets the given parameters in the Configuration Register 0 in the single channel mode.
InstancePtr | is a pointer to the XAdcPs instance. |
Channel | is the channel number for the singel channel mode. The valid channels are 0 to 6, 8, and 13 to 31. If the external Mux is used then this specifies the channel oonnected to the external Mux. Please read the Device Spec to know which channels are valid. |
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. |
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. |
References XAdcPs::IsReady, XADCPS_CFR0_ACQ_MASK, XADCPS_CFR0_AVG_VALID_MASK, XADCPS_CFR0_CHANNEL_MASK, XADCPS_CFR0_DU_MASK, XADCPS_CFR0_EC_MASK, XADCPS_CFR0_OFFSET, XADCPS_CH_ADC_CALIB, XADCPS_CH_AUX_MAX, XADCPS_CH_AUX_MIN, XADCPS_CH_VBRAM, XADCPS_CH_VCCPINT, XADCPS_CH_VPVN, XAdcPs_GetSequencerMode(), XAdcPs_ReadInternalReg(), XADCPS_SEQ_MODE_SINGCHAN, and XAdcPs_WriteInternalReg().
void XAdcPs_WriteInternalReg | ( | XAdcPs * | InstancePtr, |
u32 | RegOffset, | ||
u32 | Data | ||
) |
#include <xadcps.c>
This function is used for writing to XADC Registers using the command FIFO.
InstancePtr | is a pointer to the XAdcPs instance. |
RegOffset | is the offset of the XADC register to be written. |
Data | is the data to be written. |
References XAdcPs_FormatWriteData, XAdcPs_ReadFifo, and XAdcPs_WriteFifo.
Referenced by XAdcPs_DisableUserOverTemp(), XAdcPs_EnableUserOverTemp(), XAdcPs_SetAdcClkDivisor(), XAdcPs_SetAlarmEnables(), XAdcPs_SetAlarmThreshold(), XAdcPs_SetAvg(), XAdcPs_SetCalibEnables(), XAdcPs_SetMuxMode(), XAdcPs_SetPowerdownMode(), XAdcPs_SetSeqAcqTime(), XAdcPs_SetSeqAvgEnables(), XAdcPs_SetSeqChEnables(), XAdcPs_SetSeqInputMode(), XAdcPs_SetSequencerEvent(), XAdcPs_SetSequencerMode(), and XAdcPs_SetSingleChParams().
XAdcPs_Config XAdcPs_ConfigTable[] |
#include <xadcps_sinit.c>
This table contains configuration information for each XADC Monitor/ADC device in the system.
XAdcPs_Config XAdcPs_ConfigTable[XPAR_XADCPS_NUM_INSTANCES] |
#include <xadcps_g.c>
This table contains configuration information for each XADC Monitor/ADC device in the system.