Functions that access a configurable hardware timer. More...
Functions | |
uint32_t | EventRecorderTimerSetup (void) |
Setup timer hardware. | |
uint32_t | EventRecorderTimerGetFreq (void) |
Get timer frequency. | |
uint32_t | EventRecorderTimerGetCount (void) |
Get timer count. | |
uint32_t | EventRecorderClockUpdate (void) |
Update Event Recorder timestamp clock. | |
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.
Code Example
uint32_t EventRecorderTimerSetup | ( | void | ) |
Setup timer hardware.
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.
uint32_t EventRecorderTimerGetFreq | ( | void | ) |
Get timer frequency.
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.
EVENT_TIMESTAMP_FREQ
. uint32_t EventRecorderTimerGetCount | ( | void | ) |
Get timer count.
This function should return a 32-bit timer value that is used to generate time stamp information for the Event Recorder.
uint32_t EventRecorderClockUpdate | ( | void | ) |
Update Event Recorder timestamp clock.
Call this function when a clock change of the Event Recorder timer source has occurred. Typically, this happens when a clock source is switched (i.e. from XTAL to low-power clock).