![]() |
sysmon
Xilinx SDK Drivers API Documentation
|
The XSysMon driver supports the Xilinx System Monitor/ADC device.The System Monitor/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 System Monitor/ADC device.
System Monitor Channel Sequencer Modes
The System Monitor Channel Sequencer supports the following operating modes:
Initialization and Configuration
The device driver enables higher layer software (e.g., an application) to communicate to the System Monitor/ADC device.
XSysMon_CfgInitialize() API is used to initialize the System Monitor/ADC device. The user needs to first call the XSysMon_LookupConfig() API which returns the Configuration structure pointer which is passed as a parameter to the XSysMon_CfgInitialize() API.
Interrupts
The System Monitor/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 XSysMon 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
System Monitor/ADC device can be accessed through the JTAG port and the AXI 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 xd/sv 05/22/07 First release 2.00a sv 07/07/08 Added bit definitions for new Alarm Interrupts in the Interrupt Registers. Changed the ADC data functions to return 16 bits of data. Added macros for conversion from Raw Data to Temperature/Voltage and vice-versa. 3.00a sdm 02/09/09 Added APIs and bit definitions for V6 SysMon. 4.00a ktn 10/22/09 Updated the driver to use the HAL Processor APIs/macros. The macros have been renamed to remove _m from the name in all the driver files. 5.00a sdm 06/15/11 Added support for XADC 7 Series. 5.01a bss 02/28/12 Added support for Zynq, renamed XSM_ATR_BRAM_UPPER to XSM_ATR_VBRAM_UPPER renamed XSM_ATR_BRAM_LOWER to XSM_ATR_VBRAM_LOWER 5.02a bss 11/23/12 Added APIs and Macros to support Temperature Updation over TEMP_OUT port(CR #679872) 5.03a bss 04/25/13 Modified XSysMon_SetSeqChEnables, XSysMon_SetSeqAvgEnables, XSysMon_SetSeqInputMode and XSysMon_SetSeqAcqTime APIs to check for Safe Mode instead of Single Channel mode(CR #703729) in xsysmon.c Modified examples: xsysmon_polled_example.c, xsysmon_low_level_example.c, xsysmon_intr_printf_example.c, xsysmon_intr_example.c xsysmon_extmux_example.c and xsysmon_polled_printf_example.c to set Sequencer Mode as Safe mode instead of Single channel mode before configuring Sequencer registers. 6.0 adk 19/12/13 Updated as per the New Tcl API's 7.0 bss 7/25/14 To support Ultrascale: Added XSM_CH_VUSR0 - XSMXSM_CH_VUSR3,XSM_MAX_VUSR0 - XSM_MIN_VUSR3,XSM_ATR_VUSR0_UPPER - XSM_ATR_VUSR3_LOWER macros. Added XSM_IP_OFFSET macro(since register offsets are different for Ultrascale compared to earlier families),Offsets,Masks for VUSER0 to VUSER3 channels, Configuration Register 3 and Sequence Registers 8 and 9 in xsysmon_hw.h. Modified XSysMon_GetAdcData, XSysMon_GetMinMaxMeasurement, XSysMon_SetSingleChParams, XSysMon_SetAlarmEnables, XSysMon_GetAlarmEnables,XSysMon_SetSeqChEnables, XSysMon_GetSeqChEnables,XSysMon_SetSeqAvgEnables, XSysMon_GetSeqAvgEnables,XSysMon_SetAlarmThreshold and XSysMon_GetAlarmThreshold in xsysmon.c. Modified driver tcl to generate XPAR_SYSMON_0_IP_TYPE parameter. 7.1 bss 05/06/15 Modified temperature transfer function for for Ultrascale CR#859369 7.2 sk 11/10/15 Used UINTPTR instead of u32 for Baseaddress CR# 867425. Changed the prototype of XSysMon_CfgInitialize API. 7.2 adk 29/02/16 Updated interrupt example to support Zynq and ZynqMP CR#938326. 7.2 asa 11/03/16 Made changes to use configuration register 3 only for Ultrascale. This fixes the CR#910905. 7.2 adk 14/03/16 Fix compilation issues when sysmon is configured with streaming interface CR#940976. 7.3 vns 15/04/16 Corrected Ultrascale conversion formulae CR#949949 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 sysmon examples to recognize it as documentation block for doxygen generation. 7.4 ms 04/18/17 Modified tcl file to add suffix U for all macros definitions of sysmon in xparameters.h