PPS refclock on Macs
James Clark <[email protected]> Thu, 5 Jun 2025 12:29:56 +0700
| Newsgroups | gmane.comp.time.chrony.user |
|---|---|
| Message-ID | <CANz3_EZz58eh=rxGtg6JYzWADA18aedvzpUBFX6N8kmQAFB04Q@mail.gmail.com> |
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