[time-nuts] Re: PPS latency? User vs kernel mode

Hal Murray halmurray at sonic.net
Sun Dec 12 01:42:28 UTC 2021


Adam Space said
> I have a PPS with Raspberry Pi setup going. Of course, in terms of precision,
> it's quite good (for me it's as good as I'd ever care for), and for accuracy
> it's quite good too. Although I guess the problem is, I don't really know how
> good the accuracy is, nor am I sure how I would go about finding out. 

You can write a hack program that does:
  wait until X
  grab time
  turn on GPIO or modem control signal
  grab time

The 2 time stamps are your error bars.  With a scope, you can compare the 
output signal with a PPS signal.

> I am not using kernel mode right now,

What do you mean by "kernel mode"?

> When I run ntp..

Which OS/distro?  Which vesion/flavor of ntp?

> and averaging over long periods of time

NTP doesn't really work that way.  The crystal frequency is temperature 
dependent.  The box temperature follows daily cycles and 
air-conditioning/heater cycles and CPU load.  ntpd polling interval has to 
work fast enough to track those changes.  Slower can average some noise.  It 
tries to adjust the polling interval to balance the gain from averaging 
against the environmental changes -- looking for the bottom of the ADEV curve.

The CPU/header is close to the crystal so CPU work can result is sudden 
changes in crystal temperature.  A cron job that does significant CPU work is 
likely to show up on daily graphs.

Longer polling intervals reduce the load on the network and servers.


> With regards to kernel mode, I was looking to give it a try. However, the
> guides I've found on this, some posted several years ago on this list, are
> pretty outdated

Do you have a GPS HAT?  Which one?


-- 
These are my opinions.  I hate spam.






More information about the Time-nuts_lists.febo.com mailing list