Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Sets CPU timestamp’s timer frequency, in Hertz.

Files

cpu_core.h/cpu_core.c

Prototype

Code Block
languagecpp
          void  CPU_TS_TmrFreqSet (CPU_TS_TMR_FREQ  freq_hz);


Arguments

freq_hz

Frequency (in Hertz) to set for CPU timestamp’s timer.

Returned Value

None.

Required Configuration

Available only if either of the following CPU features is enabled in cpu_cfg.h :

Notes / Warnings

  1. CPU timestamp timer frequency is not required for internal CPU timestamp operations and may optionally be configured by application/BSP initialization functions for use with optional CPU_TS_to_uSec() functions to convert CPU timestamps from timer counts into microseconds (see

...

  1. CPU_TS32_to_uSec

...

  1.  and CPU_TS64_to_uSec

...

  1. )

...

  1. .

Example Usage

Anchor
Listing - CPU_TS_TmrFreqSet() example usage
Listing - CPU_TS_TmrFreqSet() example usage

Code Block
languagecpp
titleListing - CPU_TS_TmrFreqSet() example usage
linenumberstrue
          CPU_TS_TmrFreqSet(2500000u);  /* Set CPU timestamp timer frequency to 2.5 MHz. */