Hello experts,
I made simple test related to the system time on TDA4 and the results are showing time difference between GTC module and Linux time. The test compares the elapsed time in uSec for certain period of time (1s, 10s and 100s). The test results are showing that GTC clock (time) is slower than the Linux clock (time).
SDK version is 7.02 and I am running Linux on A72 core.
This is code snippet of the test application:
uint32_t sleepTime = 1;
for(i = 0; i < 3; i++)
{
printf("Test with sleep = %d s\n", sleepTime);
globalTimestamp1 = appLogGetGlobalTimeInUsec();
localTimestamp1 = appLogGetLocalTimeInUsec();
sleep(sleepTime);
globalTimestamp2 = appLogGetGlobalTimeInUsec();
localTimestamp2 = appLogGetLocalTimeInUsec();
localDiff = localTimestamp2 - localTimestamp1;
globalDiff = globalTimestamp2 - globalTimestamp1;
printf("local diff: %ld us \n", localDiff);
printf("global diff: %ld us \n", globalDiff);
printf("local-global: %ld us \n", localDiff - globalDiff);
printf("---------------------------------------\n");
sleepTime *= 10;
}
Here are the test results:
Test with sleep = 1 s local diff: 1000062 us global diff: 999994 us local-global: 68 us --------------------------------------- Test with sleep = 10 s local diff: 10000063 us global diff: 9999381 us local-global: 682 us --------------------------------------- Test with sleep = 100 s local diff: 100000072 us global diff: 99993243 us local-global: 6829 us ---------------------------------------
Please, can you check these measurements? What could be the reason for this time difference?
Regards,
Darko