CPU_TS_TmrInit

Description

Application-defined function to initialize and start the CPU timestamp’s (hardware or software) timer.

Files

cpu_core.h / Application’s cpu_bsp.c

Prototype

          void  CPU_TS_TmrInit (void);


Arguments

None.

Returned Value

None.

Required Configuration

CPU_TS_TmrInit() is an application/BSP function that must be defined by the developer if either of the following CPU features is enabled in cpu_cfg.h :

Notes / Warnings

  1. CPU timestamp timer count values must be returned via word-size-configurable CPU_TS_TMR data type. If timer has more bits, truncate timer values’ higher-order bits greater than the configured CPU_TS_TMR timestamp timer data type word size. However, since the timer must not have less bits than the configured CPU_TS_TMR timestamp timer data type word size; CPU_CFG_TS_TMR_SIZE must be configured so that all bits in CPU_TS_TMR data type are significant. In other words, if timer size is not a binary-multiple of 8-bit octets (e.g., 20-bits or even 24-bits), then the next lower, binary-multiple octet word size should be configured (e.g. to 16-bits). However, the minimum supported word size for CPU timestamp timers is 8-bits.
  2. CPU timestamp timer should be an ‘up’ counter whose values increase with each time count. If timer is a ‘down’ counter whose values decrease with each time count, then the returned timer value must be ones-complemented.
  3. When applicable, CPU timestamp timer period should be less than the typical measured time but must be less than the maximum measured time; otherwise, timer resolution inadequate to measure desired times.

Implementation Template

Listing - CPU_TS_TmrInit() implementation template
          void  CPU_TS_TmrInit (void)
          {
              /* Insert code to initialize/start CPU timestamp timer. */ ;
          }