![]() |
xadcps
Vitis Drivers API Documentation
|
The XAdcPs driver supports the Xilinx XADC/ADC device.The XADC/ADC device has the following features:
The user should refer to the hardware device specification for detailed information about the device.
This header file contains the prototypes of driver functions that can be used to access the XADC/ADC device.
XADC Channel Sequencer Modes
The XADC Channel Sequencer supports the following operating modes:
Read the XADC spec for more information about the sequencer modes.
Initialization and Configuration
The device driver enables higher layer software (e.g., an application) to communicate to the XADC/ADC device.
XAdcPs_CfgInitialize() API is used to initialize the XADC/ADC device. The user needs to first call the XAdcPs_LookupConfig() API which returns the Configuration structure pointer which is passed as a parameter to the XAdcPs_CfgInitialize() API.
Interrupts
The XADC/ADC device supports interrupt driven mode and the default operation mode is polling mode.
The interrupt mode is available only if hardware is configured to support interrupts.
This driver does not provide a Interrupt Service Routine (ISR) for the device. It is the responsibility of the application to provide one if needed. Refer to the interrupt example provided with this driver for details on using the device in interrupt mode.
Virtual Memory
This driver supports Virtual Memory. The RTOS is responsible for calculating the correct device base address in Virtual Memory space.
Threads
This driver is not thread safe. Any needs for threads or thread mutual exclusion must be satisfied by the layer above this driver.
Asserts
Asserts are used within all Xilinx drivers to enforce constraints on argument values. Asserts can be turned off on a system-wide basis by defining, at compile time, the NDEBUG identifier. By default, asserts are turned on and it is recommended that users leave asserts on during development.
Building the driver
The XAdcPs driver is composed of several source files. This allows the user to build and link only those parts of the driver that are necessary.
Limitations of the driver
XADC/ADC device can be accessed through the JTAG port and the PLB interface. The driver implementation does not support the simultaneous access of the device by both these interfaces. The user has to care of this situation in the user application code.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00a ssb 12/22/11 First release based on the XPS/AXI xadc driver 1.01a bss 02/18/13 Modified XAdcPs_SetSeqChEnables,XAdcPs_SetSeqAvgEnables XAdcPs_SetSeqInputMode and XAdcPs_SetSeqAcqTime APIs in xadcps.c to fix CR #693371 1.03a bss 11/01/13 Modified xadcps_hw.h to use correct Register offsets CR#749687 2.1 bss 08/05/14 Added declarations for XAdcPs_SetSequencerEvent, XAdcPs_GetSamplingMode, XAdcPs_SetMuxMode, XAdcPs_SetPowerdownMode and XAdcPs_GetPowerdownMode functions. Modified Assert for XAdcPs_SetSingleChParams in xadcps.c to fix CR #807563. 2.2 bss 04/27/14 Modified to use correct Device Config base address in xadcps.c (CR#854437). ms 01/23/17 Added xil_printf statement in main function for all examples to ensure that "Successfully ran" and "Failed" strings are available in all examples. This is a fix for CR-965028. ms 03/17/17 Added readme.txt file in examples folder for doxygen generation. ms 04/05/17 Modified Comment lines in functions of xadcps examples to recognize it as documentation block for doxygen generation. 2.3 mn 07/09/18 Fix Doxygen warning 2.6 aad 11/02/20 Fix MISRAC Mandatory and Advisory errors. aad 12/17/20 Added missing function declarations and removed functions with no definitions. 2.7 cog 07/24/23 Added support for SDT flow