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
Code Block | ||
---|---|---|
| ||
CPU_INT64U CPU_TS32_to_uSec (CPU_TS32 ts_cnts); |
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
- The amount of time measured by CPU timestamps is calculated by either of the following equations:
...
Developer-defined CPU_TS32_to_uSec()
implementations may convert any number of CPU_TS32
bits, up to 32, into microseconds.
...
Implementation Template
Anchor | ||||
---|---|---|---|---|
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
CPU_INT64U CPU_TS32_to_uSec (CPU_TS32 ts_cnts)
{
CPU_INT64U ts_usec;
:
: /* Insert code to convert 32-bit CPU timestamp into microseconds. */
:
return (ts_usec);
} |