Xpm_SetUpAnEvent - 2020.2 English

OS and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2020-11-24
Version
2020.2 English

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.

Note: None.

Prototype

u32 Xpm_SetUpAnEvent(u32 EventID);

Parameters

The following table lists the Xpm_SetUpAnEvent function arguments.

Table 1. Xpm_SetUpAnEvent Arguments
Name Description
Event ID. For valid values, please refer xpm_counter.h.

Returns

  • Counter Number if successful. For Cortex-R5, valid return values are 0, 1, or 2.
  • XPM_NO_COUNTERS_AVAILABLE (0xFF) if all counters are being used