The System Performance Monitor (SYSPM) is a memory mapped peripheral that enables the user to monitor system and/or CPU events. The SYSPM consists of sixteen 256 Byte sub-slots (SS). The first subslot is the configuration slot. The registers in the configuration SS0 describe the number of monitors, types of monitors and number of counters per monitor. Subsequent subslots are occupied by an optional Programmable System Activity Monitor (PSAM), and Performance Monitors (PERFMON) registers.
|
enum | syspm_monitor_t {
kSYSPM_Monitor0 = 0U,
kSYSPM_Monitor1 = 1U
} |
| syspm select control monitor More...
|
|
enum | syspm_event_t {
kSYSPM_Event1 = 0U,
kSYSPM_Event2 = 1U,
kSYSPM_Event3 = 2U
} |
| syspm select event More...
|
|
enum | syspm_mode_t {
kSYSPM_BothMode = 0x00,
kSYSPM_UserMode = 0x02,
kSYSPM_PrivilegedMode = 0x03
} |
| syspm set count mode More...
|
|
enum | syspm_startstop_control_t {
kSYSPM_Idle = 0x00,
kSYSPM_LocalStop = 0x01,
kSYSPM_LocalStart = 0x02,
KSYSPM_EnableTraceControl = 0x04,
kSYSPM_GlobalStart = 0x05,
kSYSPM_GlobalStop = 0x06
} |
| syspm start/stop control More...
|
|
|
void | SYSPM_Init (SYSPM_Type *base) |
| Initializes the SYSPM. More...
|
|
void | SYSPM_Deinit (SYSPM_Type *base) |
| Deinitializes the SYSPM. More...
|
|
void | SYSPM_SelectEvent (SYSPM_Type *base, syspm_monitor_t monitor, syspm_event_t event, uint8_t eventCode) |
| Select event counters. More...
|
|
void | SYSPM_ResetEvent (SYSPM_Type *base, syspm_monitor_t monitor, syspm_event_t event) |
| Reset event counters. More...
|
|
void | SYSPM_ResetInstructionEvent (SYSPM_Type *base, syspm_monitor_t monitor) |
| Reset Instruction Counter. More...
|
|
void | SYSPM_SetCountMode (SYSPM_Type *base, syspm_monitor_t monitor, syspm_mode_t mode) |
| Set count mode. More...
|
|
void | SYSPM_SetStartStopControl (SYSPM_Type *base, syspm_monitor_t monitor, syspm_startstop_control_t ssc) |
| Set Start/Stop Control. More...
|
|
void | SYSPM_DisableCounter (SYSPM_Type *base, syspm_monitor_t monitor) |
| Disable Counters if Stopped or Halted. More...
|
|
uint64_t | SYSPM_GetEventCounter (SYSPM_Type *base, syspm_monitor_t monitor, syspm_event_t event) |
| This is the the 40-bits of eventx counter. More...
|
|
Enumerator |
---|
kSYSPM_Monitor0 |
Monitor 0.
|
kSYSPM_Monitor1 |
Monitor 1.
|
Enumerator |
---|
kSYSPM_Event1 |
Event 1.
|
kSYSPM_Event2 |
Event 2.
|
kSYSPM_Event3 |
Event 3.
|
Enumerator |
---|
kSYSPM_BothMode |
count in both modes
|
kSYSPM_UserMode |
count only in user mode
|
kSYSPM_PrivilegedMode |
count only in privileged mode
|
Enumerator |
---|
kSYSPM_Idle |
idle >
|
kSYSPM_LocalStop |
local stop
|
kSYSPM_LocalStart |
local start
|
KSYSPM_EnableTraceControl |
enable global TSTART/TSTOP
|
kSYSPM_GlobalStart |
global stop
|
kSYSPM_GlobalStop |
global start
|
void SYSPM_Init |
( |
SYSPM_Type * |
base | ) |
|
This function enables the SYSPM clock.
- Parameters
-
base | SYSPM peripheral base address. |
void SYSPM_Deinit |
( |
SYSPM_Type * |
base | ) |
|
This function disables the SYSPM clock.
- Parameters
-
base | SYSPM peripheral base address. |
- Parameters
-
base | SYSPM peripheral base address. |
event | syspm select event, see to syspm_event_t. |
eventCode | select which event to be counted in PMECTRx., see to table Events. |
- Parameters
-
base | SYSPM peripheral base address. |
monitor | syspm control monitor, see to syspm_monitor_t. |
void SYSPM_ResetInstructionEvent |
( |
SYSPM_Type * |
base, |
|
|
syspm_monitor_t |
monitor |
|
) |
| |
- Parameters
-
base | SYSPM peripheral base address. |
monitor | syspm control monitor, see to syspm_monitor_t. |
- Parameters
-
base | SYSPM peripheral base address. |
monitor | syspm control monitor, see to syspm_monitor_t. |
mode | syspm select counter mode, see to syspm_mode_t. |
- Parameters
-
base | SYSPM peripheral base address. |
monitor | syspm control monitor, see to syspm_monitor_t. |
ssc | This 3-bit field provides a three-phase mechanism to start/stop the counters. It includes a prioritized scheme with local start > local stop > global start > global stop > conditional TSTART > TSTOP. The global and conditional start/stop affect all configured PM/PSAM module concurrently so counters are "coherent". see to syspm_startstop_control_t |
- Parameters
-
base | SYSPM peripheral base address. |
monitor | syspm control monitor, see to syspm_monitor_t. |
The value in this register increments each time the event
selected in PMCRx[SELEVTx] occurs.
- Parameters
-
- Returns
- get the the 40 bits of eventx counter.