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.
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).