I am developing an application on the ble dev board with an external program sending current time via uart to the 2642 at a 10 second interval. I am using the clock utilities to update the time every 10 milliseconds.
The application is based on the simple_broadcaster example. The BLE advertisement contains the current time. Over 12-14 hours the timer has slowed to around 15 milliseconds. The code to set up the clock is:
Util_constructClock(&clkAdvUpdate, SimpleBroadcaster_clockHandler,
SB_ADV_UPDATE_TIMEOUT, SB_ADV_UPDATE_TIMEOUT,
true, SB_UPDATE_ADV_EVT);
#define SB_ADV_UPDATE_TIMEOUT 10
The clock handler:
static void SimpleBroadcaster_clockHandler(UArg arg)
{
uint8_t evtId = (uint8_t) (arg & 0xFF);
switch (evtId)
{
case SB_UPDATE_ADV_EVT:
SimpleBroadcaster_enqueueMsg(SB_UPDATE_ADV_EVT, 0);
Util_startClock(&clkAdvUpdate);
break;
default:
break;
}
}
I'm outputting a signal I can track with an oscilloscope and see that the time interval grows over time to well over 50% error.
This error only occurs when I am receiving the uart message every 10 seconds with the time. If I don't send the message, the timer stays at 10 milliseconds.
Any ideas?
I am using sdk 5-10-00-48.