Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
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.