Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Description

Application-defined function to convert a 32-bit CPU timestamp from timer counts to microseconds.

Files

cpu_core.h / Application’s cpu_bsp.c

Prototype

Arguments

ts_cnts

32-bit CPU timestamp (in CPU timestamp timer counts).

Returned Value

Converted 32-bit CPU timestamp (in microseconds).

Required Configuration

CPU_TS32_to_uSec() is an application/BSP function that may be optionally defined by the developer if CPU_CFG_TS_32_EN is DEF_ENABLED in cpu_cfg.h. See Timestamps Configuration.

Notes / Warnings

  1. The amount of time measured by CPU timestamps is calculated by either of the following equations:

Time measured = Number timer counts * Timer period * 10^6 microseconds
Time measured = (Number timer counts / Timer frequency) * 10^6 microseconds

Number timer counts

Number of timer counts measured

Timer period

Timer’s period in some units of (fractional) seconds

Timer frequency

Timer’s frequency in some units of counts per second

Time measured

Amount of time measured, in microseconds

Developer-defined CPU_TS32_to_uSec() implementations may convert any number of CPU_TS32 bits, up to 32, into microseconds.

Example Template

  • No labels