Xpm_GetEventCounter - 2023.1 English

Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2023-05-16
Version
2023.1 English

Reads the counter value for the requested counter ID. This function reads the number of events that has been counted for the requsted event ID. This function is called after a call to Xpm_SetUpAnEvent.

Prototype

u32 Xpm_GetEventCounter(u32 EventCntrId, 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-R5 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).