have some questions about understanding your code below; in C:\PROCESSOR_SDK_RADAR_03_07_00_00\vision_sdk\links_fw\src\rtos\utils_common\src\utils.c
UInt64 Utils_getCurTimeInUsec(void)
{
static UInt32 cpuMhz = 700U; /* default */
static Bool isInitialized = (Bool)FALSE;
Types_Timestamp64 ts64;
UInt64 curTs;
if(!isInitialized)
{
/* do this only once */
Types_FreqHz cpuHz;
isInitialized = (Bool)TRUE;
Timestamp_getFreq(&cpuHz);
cpuMhz = cpuHz.lo / (1000U*1000U); /* convert to Mhz */
Vps_printf(" *** UTILS: CPU MHz = %d Mhz ***\n", cpuMhz);
}
Timestamp_get64(&ts64);
curTs = (UInt64) ts64.hi << (UInt64)16U;
curTs = (UInt64) curTs << (UInt64)16U;
curTs = (UInt64) curTs | (UInt64)ts64.lo;
return (curTs/cpuMhz);
this will make the /cpuMh=20MHz all the time,