[time-nuts] Beaglebone Black driver for hardware timer capture

Dan Drown dan-timenuts at drown.org
Tue Dec 2 04:31:15 UTC 2014


I wrote a kernel driver for the BBB timer hardware. It produces pps events for things like ntpd to consume. The source for it is at https://github.com/ddrown/pps-gmtimer

A side effect of this driver is it measures the interrupt latency and jitter on the BBB hardware. The attached file interrupt-latency.png contains an interrupt latency histogram and cumulative distribution function. This interrupt latency should be similar to what the pps-gpio driver experiences on this hardware. The difference is the timer hardware driver can remove the effects of the interrupt latency. 

The graphs of offset over 7 days worth of samples don't show a huge difference. The *-timer.png file is from pps-gmtimer and the *-gpio.png file is from pps-gpio.  The stddev of the offsets are 244ns from the gpio run and 143ns from the timer run. 

The BBB hardware supports hardware IEEE1588/PTP timestamps, so people might be interested in that as well. The driver for it is already in Linux, but not enabled in the default BBB kernel config. 

Let me know if you have any questions. 

Unrelated to the PPS driver: all the feedback on the software frequency temperature compensation has been useful. 90% of the time, the local clock is within 173ppb. 98% of the time, it's within 218ppb. I think I can narrow this range even further with a temperature rate of change variable. All the graphs are at http://dan.drown.org/bbb/latest/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interrupt-latency.png
Type: image/png
Size: 10639 bytes
Desc: not available
URL: <http://febo.com/pipermail/time-nuts_lists.febo.com/attachments/20141201/5af4b386/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: percentiles-offset-timer.png
Type: image/png
Size: 12928 bytes
Desc: not available
URL: <http://febo.com/pipermail/time-nuts_lists.febo.com/attachments/20141201/5af4b386/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: percentiles-offset-gpio.png
Type: image/png
Size: 12985 bytes
Desc: not available
URL: <http://febo.com/pipermail/time-nuts_lists.febo.com/attachments/20141201/5af4b386/attachment-0002.png>


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