Part Number: AM3352
Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
The test project I built is based on 3352 + TI-RTOS. I want to get the exact time interval for the program to run.
1. in .cfg file, configure cpu freq as : BIOS.cpuFreq.lo = 300000000; //300Mhz
2. in one task , get freq as:
Types_FreqHz freq,freq2;
Timestamp_getFreq(&freq);
BIOS_getCpuFreq(&freq2);
--->"freq.lo = 300000000 and freq2.lo = 300000000, I don't know why these two values are equal.( I see freq2.lo = 300Mhz, but ,freq.lo)"
UINT32 time1 = Timestamp_get32();
Task_sleep(100);
UINT32 time2 = Timestamp_get32();
UINT32 delta = time2 - time1;
--->"detla" different value { 59968146 59978175 59942046 59950662 59943836 }. why different?
and, real_time should be equal 0.1s, but (deltla / freq.lo) real_time=59968146/300000000 = 0.19989382 (s) ; like 0.19989382 /2 ,why?
3.in DMtimer Interrupt, 1ms cycle
Isr{
UINT32 timestamp = Timestamp_get32();
static UINT32 s_timestamp = timestamp;
g_timestampDelta = timestamp - s_timestamp;
s_timestamp = timestamp;
}
g_timestampDelta ,different value { 599982 610108 600050 600052 599984 }. why different?
real_time = 599982 / 300000000 ?, bu not 1ms the same question as in task.
Where is the problem?
different value { 59968146 59978175 59942046 59950662 59943836 }. why different?