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.
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 for other processors valid values are 0 to 5. |
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).