Event Recorder and Component Viewer  Version 1.4.0
MDK Debugger Views for Status and Event Information
 All Files Functions Macros Groups Pages
Event Recorder - Timer

Functions that access a configurable hardware timer. More...

Functions

uint32_t EventRecorderTimerSetup (void)
 Setup timer hardware. More...
 
uint32_t EventRecorderTimerGetFreq (void)
 Get timer frequency. More...
 
uint32_t EventRecorderTimerGetCount (void)
 Get timer count. More...
 
uint32_t EventRecorderClockUpdate (void)
 Update Event Recorder timestamp clock. More...
 

Description

Functions that access a configurable hardware timer.

This section contains user-provided functions, which configure and provide timing information for recorded events. It is required to implement these functions, when User Timer is selected as time stamp source.

The source file EventRecorder.c implements __WEAK functions for EventRecorderTimerSetup, EventRecorderTimerGetFreq and EventRecorderTimerGetCount. This allows to overwrite the functions by a user application.

Note
ARM Cortex-M3/M4/M7/M33 processors provide a debug timer (DWT CYCCNT) that can be used during debug. Refer to DWT Programmers' model for more information.

Code Example

Function Documentation

uint32_t EventRecorderClockUpdate ( void  )

Update Event Recorder timestamp clock.

Returns
status (1=Success, 0=Failure)

This function should be called by the user code when a clock change of the event recorder timer in the system occurred. Typically, this happens when a clock source is switched (i.e. from XTAL to low-power clock).

Note
This feature is currently not supported by MDK.
uint32_t EventRecorderTimerGetCount ( void  )

Get timer count.

Returns
timer count (32-bit)

This function should return a 32-bit timer value that is used to generate time stamp information for the Event Recorder.

uint32_t EventRecorderTimerGetFreq ( void  )

Get timer frequency.

Returns
timer frequency in Hz

This function is called by EventRecorderInitialize to initialize the timer that is used by the Event Recorder. For time stamp source User Timer (Power-On Reset) this function is only called for the first call to EventRecorderInitialize.

Note
MDK is using currently a fixed frequency that is defined by EVENT_TIMESTAMP_FREQ.
uint32_t EventRecorderTimerSetup ( void  )

Setup timer hardware.

Returns
status (1=Success, 0=Failure)

This function is called by EventRecorderInitialize to initialize the timer that is used by the Event Recorder. For time stamp source User Timer (Power-On Reset) this function is only called for the first call to EventRecorderInitialize.