To use the built-in Due RTC, the board must have a 32.768 kHz xtal installed. Mine did not have that, so I soldered an available one in.
Using the Markus Lange demo software as a basis, I ran the RTC, printing the computer timestamp and the RTC time in the serial monitor at ~1 min intervals. It showed a slow drift of the RTC of about 18 seconds per 24 h, but, strangely, around 5:00 at night, a rapid jump of maximum about 4 minutes . After that, the slow drift continued. The next night, at around the same time, a similar jump occurred, but this time it was about 23 minutes! (and then the slow drift again) Neither jump was instantaneous (as one would expect, for instance ,in case of a numerical overflow), but the first one took about 1 hour, the second about 3 hours. I tried to include a graph of the difference between the timestamp and the RTC readings.
Any explanations??
Are you sure is is not your PC correcting itself? Windows can fetch the time from the internet to stay synced.
The PC is on automatic correction. It synced itself by less than a second around 20:00 the first evening, and I manually synced it the next afternoon. Again, the correction was less than a second.
But, the problem is solved: the room temperature dropped during the night, and the Xtal could no longer force the free-running oscillator to sync, so this oscillator took over. I verified with a second Due, cooling it to 10 C. Perhaps the low tolerance to temperature variations is due to my Xtals not being the original type.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.