| sysmon Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Functions
xsysmon_aux_polled_example.c File Reference

## Overview

This file contains a design example using the driver functions of the System Monitor/ADC driver.

This example shows the usage of the driver/device in polled mode with external mux and XADC in continuous pass Sequencer mode. It is provided to illustrate the usage of external mux.

    MODIFICATION HISTORY:

    Ver   Who    Date     Changes

    7.5   mn     09/12/18 First release
    7.8   cog    07/20/23 Added support for SDT flow

## Functions
int | SysMonAuxPolledExample (u16 SysMonDeviceId)
| This function runs a test on the System Monitor/ADC device using the driver APIs. More...
int | main (void)
| Main function that invokes the polled example in this file. More...

## Function Documentation

int main | ( | void |  | ) |

Main function that invokes the polled example in this file.

Parameters

  None. |

Returns
  - XST_SUCCESS if the example has completed successfully.
  - XST_FAILURE if the example has failed.

Note
  None.

References SysMonAuxPolledExample().

int SysMonAuxPolledExample | ( | u16 | SysMonDeviceId | ) |

This function runs a test on the System Monitor/ADC device using the driver APIs.

This function does the following tasks:

- Initiate the XADC device driver instance
- Run self-test on the device
- Reset the device
- Set up sequencer registers to continuously monitor the auxiliary channels available in XADC
- Set up configuration registers to start the sequencer in continuous pass mode
- Wait until End of sequence interrupt occurs and read the conversion data

Parameters

  SysMonDeviceId | is the XPAR_<SYSMON_ADC_instance>_DEVICE_ID value from xparameters.h.

Returns
  - XST_SUCCESS if the example has completed successfully.
  - XST_FAILURE if the example has failed.

Note
  None

References XSysMon_Config::BaseAddress, XSM_AVG_16_SAMPLES, XSM_CH_AUX_MIN, XSM_SEQ_CH_AUX00, XSM_SEQ_MODE_CONTINPASS, XSM_SEQ_MODE_SAFE, XSM_SR_EOS_MASK, XSysMon_CfgInitialize(), XSysMon_GetAdcData(), XSysMon_GetStatus(), XSysMon_LookupConfig(), XSysMon_RawToVoltage, XSysMon_SelfTest(), XSysMon_SetAdcClkDivisor(), XSysMon_SetAvg(), XSysMon_SetExtenalMux(), XSysMon_SetSeqAcqTime(), XSysMon_SetSeqAvgEnables(), XSysMon_SetSeqChEnables(), XSysMon_SetSeqInputMode(), and XSysMon_SetSequencerMode().

Referenced by main().