This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR1843: Timer delay implementation using Timer_create() Sysbios timer => not accurate

Part Number: AWR1843

Good afternoon,

I implemented the solution shown in the following discussion:

AWR1642: Using watchdog function, but encountered a problem. - Sensors forum - Sensors - TI E2E support forums

I replaced the interrupt routine with the following:

void PeriodicFunc(UArg arg0)
{
     TmrMsgObj msg;
     msg.value = (unsigned long long) Cycleprofiler_getTimeStamp();
     Mailbox_post(gMmwMssMCB.tmrMsgsMbxHandle, &msg, BIOS_NO_WAIT);
}

And, in my reading task, I wrote the following:

Mss_createBiosTimer(400); // 400ms

int i;
TmrMsgObj msg;

for (i=0; i<10; i++) {
     Mailbox_pend(gMmwMssMCB.tmrMsgsMbxHandle, &msg, BIOS_WAIT_FOREVER);
     System_printf("msg.value=%u\n", (uint32_t) msg.value);
}

Then, using Excel, I setup this summary table, from the System_printf output to compute the difference between the machine cycles read, assuming each value is a machine cycle read after 400ms timer delay.

value delta value in us value in ms
msg.value=80006709 80006709
msg.value=124376872 124376872 44370163 221850.82 221.8508
msg.value=172748329 172748329 48371457 241857.29 241.8573
msg.value=216073079 216073079 43324750 216623.75 216.6238
msg.value=265455695 265455695 49382616 246913.08 246.9131
msg.value=313436254 313436254 47980559 239902.80 239.9028
msg.value=363168930 363168930 49732676 248663.38 248.6634
msg.value=412344000 412344000 49175070 245875.35 245.8754
msg.value=461163926 461163926 48819926 244099.63 244.0996
msg.value=510954697 510954697 49790771 248953.86 248.9539

My question is why the values in the "value in ms" column are not that close to 400 ms as expected?

Trying other delays below 400ms leads to even worse results.

Thanks in advance.