[chrony-users] PPS refclock on Macs

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


I did a couple of proof-of-concept implementations of how to get a PPS signal into chrony on a modern Mac (I was using a Mac mini M4):

1. Use a USB-to-TTL adapter (I used an FTDI one); connect the PPS of the GPS to the CTS pin of the adapter; then poll the modem status lines
2. Convert the pulse to an audio signal; connect the audio signal to the LINE in of a USB audio card; use CoreAudio framework to get timestamps of audio samples

The second approach works quite a bit better than the first, which I attribute to kernel support in macOS for timestamping audio and to USB audio being isochronous. There's a constant error of about 0.35ms, but once you correct for that the jitter is in the few microseconds range.

I wrote it up here: https://github.com/jclark/mac-pps

James



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/