Re: [chrony-users] Synchronize from precise RTC when offline or long time without synchronization |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
On Thu, 14 Dec 2017, Jan Breuer wrote:
We have a device based on RaspberryPi running recent Raspbian Linux.
We are using TCXO based RTC which should keep time within ±3ppm (PCF2129).
3ppm is not terribly precise. That is 1 second in about 3 days. And if that is
your only timekeeper (source) it is all you are going to get.
We also expect that some devices will work completely without network all the time so they will never see any NTP
server.
Then you are going to have to get some other source for time.
I would like to have the most precise time on my device.
What I would like to do is to use RTC time in holdover (RTC->sys) and synchronize RTC in normal operation
(sys->RTC).
But without an external source, your system could drift by much more than
3PPM.
User will be able to manually set correct time in offline device if needed so this should also propagate to RTC.
A user setting will be good to more than 1 second.
I know that rtcsync option will do the sys->RTC
I know that with refclock, I can implement SHM/SOCK driver which do RTC->sys but this will prevent rtcsync on the
same RTC.
You do not want rtcsync. That makes the rtc run at the same rate as the
system, which in general is worse than 3PPM if it is undisciplined.
There is the chronyc command trimrtc, but again it is only good to about a
second.
Without an external source of time, your clock is going to be out by many
seconds. You can get cheap gps receivers with pps which you can use on an
isolated system which will get you acuracy down to microseconds. Or
intermittent network connectivity.
Is there a possibility to realise this so I can have both RTC->sys and sys->RTC depending on situation?
Jan Breuer