Re: [chrony-users] Issue with RTC and PPS

[ Thread Index | Date Index | More Archives ]

I am confused. RTC is NOT GPS. RTC is an onboard (or for the RPI I guess a
supplimentary board) which chrony uses ONLY at startup to set the intial
system clock to approximately the correct time. It tends to drift badly --
1000PPM might be good (That is about a second per hour).

PPSis pulse per second. It carries zero time information except that when the
pulse is sent, it is exactly (towithin nanoseconds) on the second.It needs
some other clock to tel it what the second is. That other clock is either the
from your GPS receiver or some other clock. Otherwise it assumes that the time
from the system clock is correct for the labeling of which second the pulse is
assocated with. (This may well be fine if the GPS went down for a while,
obviously not so good if the computer switched off. ) Many people use gpsd to
get the seconds label from the GPS sattelite. (that may be what your GPS
source is delivering).

You will have to find out if your pps is actually delivering pulses. Look at /sys/devices/virtual/pps/pps0/assert to see if it is increasing its pulse
count (you will also have to determine whether your second pulse occurs on
assert or clear-- probably assert)

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 ______|_

On Mon, 14 Nov 2022, Gabriele Coppi wrote:

[CAUTION: Non-UBC Email]Hello, 
I am currently using chrony (v4.0.8) on a RPi4. Due to my application, I need to use only GPS, PPS and RTC
for time keeping. The RTC is necessary to preserve the time when GPS coverage drops or at boot when the GPS
lock is not immediate.

I have this current chrony.conf directives (other that standard ones) 

refclock PPS /dev/pps0 refid PPS trust lock GPS
refclock SHM 0 refid GPS precision 1e-1 offset 0.3 delay 0.2 noselect

where  the first two are defining my sources and the second should take care of the RTC. I would like to use
the rtcfile directive to have chrony to take care of everything but it seems that Rasbian Kernel is built
without support for RTC_UEI_ON.

Now I have the following problems, when I shutdown/reboot the RPi:

 1. it seems that chrony never selects the PPS source, and given that GPS is marked as noselect, I don't have
    any GPS timing
 2. any RTC support is outside chrony, but as said I would like to track it with chrony 
I specify that chrony is run as daemon at startup with the -s flag

Any ideas? 

Mail converted by MHonArc 2.6.19+