I am working with BCM20737S and we have to keep track of time. We have an external 32.768KHz crystal and everything is setup according to the rtc_sample example. Every second I check the time using rtc_getRTCTime. The output is correct for a couple of minutes and then the clock is off by one second. I monitored the behavior of the system by printing the seconds. Bellow I have the debug log. The system gets the time from a different device and there is one second difference between the time in the
system and the PC running the debug viewer (plus the timezone difference). The difference is stable (1 second) until it reaches the point at 16:56:02. There I have for 2 different seconds the same value returned from the rtc_getRTCTime. I am not sure why this is happening. This happens after a couple of minutes after the time is synchronized and I can't see any type of periodic behavior so far.
In a thread I noticed that they were using the bleapputils_changeLPOSource(LPO_32KHZ_OSC, FALSE, 250); line to setup the crystal.
When I am using this command in the create function, I get the opposite effect, the clock is jumping a second every now and then. I am not sure if it is the driftRate wrong
and how to correctly set it up. I will disable to sleep to see if that helps but I must have the sleep enabled.