Sets up one of the event counters to count events based on the Event ID passed.
For supported Event IDs please refer xpm_counter.h. Upon invoked, the API searches for an available counter. After finding one, it sets up the counter to count events for the requested event.
Prototype
u32 Xpm_SetUpAnEvent(u32 EventID);
Parameters
The following table lists the Xpm_SetUpAnEvent
function arguments.
Name | Description |
---|---|
EventID | For valid values, please refer xpm_counter.h. |
Returns
- Counter Number if successful. For Cortex-R5F, valid return values are 0, 1, or 2.
- XPM_NO_COUNTERS_AVAILABLE (0xFF) if all counters are being used