| sysmonpsv Vitis Drivers API Documentation

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

Functions
xsysmonpsv_intr_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 intr 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.1   aad    2/7/19   First release
    1.2   aad    3/19/20  Fixed the interrupt disable flag
    2.3   aad    9/28/21  Force generate of interrupt.
    3.0   cog    03/25/21 Driver Restructure
    4.0   se     11/10/22 Secure and Non-Secure mode integration
    5.0   se     08/01/24 Added new APIs to enable, set and get averaging for
                          voltage supplies and temperature satellites.
    5.1   se     03/03/25 Compiler warnings fixed

## Functions
int | SysMonPsvIntrExample ()
| This function runs a test on the System Monitor device using the driver APIs. More...
void | Temp_CallbackFunc (void *data)
| Callback function to notify temperature event. More...
void | Supply_CallbackFunc (void *data)
| Callback function to notify supply event. More...
int | main (void)
| Main function that invokes the intr example in this file. More...

## Function Documentation

int main | ( | void |  | ) |

Main function that invokes the intr example in this file.

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

References SysMonPsvIntrExample().

void Supply_CallbackFunc | ( | void * | data | ) |

Callback function to notify supply event.

Parameters

  Data | is the data needed by the callback function.

Referenced by SysMonPsvIntrExample().

int SysMonPsvIntrExample | ( |  | ) |

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
- Enable OT interrupt
- Setup call back for interrupts
- Read supply configuration.
- Read the latest on-chip temperatures and confiured supplies

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

References Supply_CallbackFunc(), Temp_CallbackFunc(), XSysMonPsv_EnableVoltageEvents(), XSysMonPsv_GetSupplyThresholdLower(), XSysMonPsv_GetSupplyThresholdUpper(), XSysMonPsv_GetTempThresholdLower(), XSysMonPsv_GetTempThresholdUpper(), XSysMonPsv_ReadSupplyProcessed(), XSysMonPsv_ReadSupplyRaw(), XSysMonPsv_ReadTempProcessed(), XSysMonPsv_ReadTempRaw(), XSysMonPsv_SetSupplyThresholdLower(), XSysMonPsv_SetSupplyThresholdUpper(), XSysMonPsv_SetTempMode(), XSysMonPsv_SetTempThresholdLower(), XSysMonPsv_SetTempThresholdUpper(), XSysMonPsv_Supply_Arr, XSYSMONPSV_TEMP_EVENT, XSYSMONPSV_TEMP_MAX, and XSYSMONPSV_TEMP_MIN.

Referenced by main().

void Temp_CallbackFunc | ( | void * | data | ) |

Callback function to notify temperature event.

Parameters

  Data | is the data needed by the callback function.

Referenced by SysMonPsvIntrExample().