sysmonpsv: xsysmonpsv_polled_example.c File Reference

| sysmonpsv Xilinx SDK Drivers API Documentation

- Overview
- APIs
- File List
- Examples

Functions
xsysmonpsv_polled_example.c File Reference

## Overview

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

The example here shows the driver/device in polled mode to check the on-chip temperature and voltages.

Note

This examples also assumes that there is a STDIO device in the system.

    MODIFICATION HISTORY:

    Ver   Who    Date     Changes

    1.0   add    02/27/19 First release
    1.1   add    07/16/19 Added register unlock
    1.1   add    07/21/19 Added Temperature measurement

## Functions
int | SysMonPsvPolledExample ()
| This function runs a test on the System Monitor 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 SysMonPsvPolledExample().

int SysMonPsvPolledExample | ( |  | ) |

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

This function does the following tasks:

- Initiate the System Monitor device driver instance
- Read supply configuration.
- Read the latest on-chip temperatures and confiured supplies

Parameters

  None. |

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

Note
  None

References XSysMonPsv_CfgInitialize(), XSysMonPsv_IntrClear(), XSysMonPsv_IntrEnable(), XSysMonPsv_IntrGetStatus(), XSysMonPsv_LookupConfig(), XSYSMONPSV_PCSR_LOCK, XSysMonPsv_ReadDeviceTemp(), XSysMonPsv_ReadSupplyValue(), XSysMonPsv_SetNewDataIntSrc(), XSYSMONPSV_VAL, XSYSMONPSV_VAL_VREF_MAX, XSYSMONPSV_VAL_VREF_MIN, and XSysMonPsv_WriteReg.

Referenced by main().