From: Dan Drown

The system's time (kernel "clocksource") on the RPI is actually not
running at the same speed as the CPU clock.

From dmesg: arch_timer: cp15 timer(s) running at 19.20MHz (phys).

This gives you around 52ns of resolution.  I believe it's the same on
all the rpi models.

I would also like to see whether the characteristics of the GPS and its
location make a measurable difference to the RPi's timekeeping.  For
example: is it better to have a GPS with 3 service capability at a
location where the signal is poor, or is it masked by the RPi's
performance?  All this with kernel-mode PPS.

What I've used for this is a percentile of offsets.  Looking at the 1%
and 99% values on a histogram is an estimate of the system's stability.

For instance (not an rpi):
https://dan.drown.org/cheese/run3/offset-histogram.png

So from that graph, I can say that 98% of the time, the system clock
is within +/-80ns of the PPS.

I believe you're using ntpd, and my code to generate that graph from
ntpd logs is here: https://github.com/ddrown/chrony-graph/tree/ntpd


Quoting William Unruh:
The question then is how rapidly the system can respond to an
interrupt,. This at least used to be of the order of a microsecond.
Also, how logd does it take to read the clock with the kernel gettime
routines. They all limit the accuracy of your clock using gps refclock
(and also how long the wire is between the gps unit and the computer)

On different ARM hardware (beaglebone black), I've measured interrupt
latency:

https://blog.dan.drown.org/content/images/2014/Dec/interrupt-latency.png

I'd expect the rpi to have a similar magnitude.  Somewhere around
+10us delay and 1us jitter.
=================================================

Dan,

Thanks for the info on the RPi system clock.  Even at 19 MHz, it's way
better than the microsecond level in part of the ntpq -crv report.  I've now
discovered that at least one item there is at nanosecond level, so I've
updated the Perl script and MRTG presentation accordingly.

I also prefer plotting offsets, and I have a Windows program which allows
histogram plots.  Just checking the histogram on a couple of Windows PCs
they show mean 0.2 & 0.3 us and SD 7 and 10 us.

I don't know what the path is on the RPi for the PPS interrupt but I would
expect it to be similar to that on the BBblack, so that latency graph is of
interest - thanks!

Cheers,
David
--
SatSignal Software - Quality software for you
Web: https://www.satsignal.eu
Email: david-tay...@blueyonder.co.uk
Twitter: @gm8arv

_______________________________________________
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Reply via email to