Xpm_GetEventCounter - 2021.1 English

Xilinx Standalone Library Documentation OS and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2021-06-16
Version
2021.1 English

Reads the counter value for the requested counter ID.

This is used to read the number of events that has been counted for the requsted event ID. This can only be called after a call to Xpm_SetUpAnEvent.

Prototype

u32 Xpm_GetEventCounter(u32 EventHandlerId, u32 *CntVal);

Parameters

The following table lists the Xpm_GetEventCounter function arguments.

Table 1. Xpm_GetEventCounter Arguments
Name Description
EventCntrId The counter ID is the same that was earlier returned through a call to Xpm_SetUpAnEvent. Cortex-R5F supports only 3 counters. The valid values are 0, 1, or 2.
CntVal Pointer to a 32 bit unsigned int type. This is used to return the event counter value.

Returns

  • XST_SUCCESS if successful.
  • XST_FAILURE if the passed Counter ID is invalid (i.e. greater than 2).