Versions Compared

Key

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

CPU_TS_TmrRd()

Application-defined function to get current CPU timestamp timer count.

Files

cpu_core.h / Application’s cpu_bsp.c

Prototype

 

Arguments

None.

Returned Value

...

CPU_TS_TmrRd() 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 :

  • CPU timestamps when either CPU_CFG_TS_32_EN or CPU_CFG_TS_64_EN is DEF_ENABLED (see section 6-1)
  • CPU interrupts disabled time measurements when CPU_CFG_INT_DIS_MEAS_EN is #define'd (see section 7-1)

Notes / Warnings

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.

...

16-bit Down Timer Example

 

32-bit Up Timer Example

48-bit Down Timer Example