Software Drivers

xadcps v2_1

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.