Go Down

Topic: Accurately Syncing Due RTC with GPS PPS (Read 1 time) previous topic - next topic


Has anyone achieved accurately syncing the built in RTC of the Due with a GPS connected with both serial and digital pulse per second.
I have done this easily on PC's but on the Due I can't seem to get the accuracy. The difference varies up to a second.
Basically I start a timer when the rising edge of the PPS is detected, retrieve the updated time from the serial port, decode it, add 1 second and then prepare the RTC register data. Then just before telling the RTC to continue I wait until the delay from the PPS is exactly 1 second.
I am only looking for millisecond accuracy, but currently it is averaging 0.5 seconds and is in no way consistent.
It seems to me that perhaps, when updating the RTC, that the internal count is not reset and just continues when the new time is loaded, thus giving me the variable time difference.
Have searched the Amtel Sam data sheet but have not found any confirmation of this.
Does anybody know?

Go Up