~/dnim.dev
▸Writing▸About
All writing

~/writing/tags

#timing

4 posts

Precision timing
May 20, 202611 min

The $20 stratum 1 that chrony kept benching

I built a GPS-disciplined NTP server on a $20 ESP32 with single-nanosecond internal timing. Then chrony refused to use it. The fix was not in the clock. It was in everything I had assumed about serving the time.

#ntp#esp32#gps#timing
Precision timing
March 7, 20265 min

ts2phc and gpsd cannot share a serial port

One USB serial port, two programs that both need exclusive access. ts2phc wants RMC-only for PTP clock discipline; gpsd wants everything else. I wrote a demuxer that gives each one a synthetic port shaped exactly the way it expects.

#gps#ts2phc#ublox#timing
Precision timing
March 2, 20266 min

The spare cores in a BeagleBone keep better time than its kernel

The standard Linux PPS driver timestamps the GPS pulse in an interrupt handler and pays ~20 µs of jitter for it. The BeagleBone has two 200 MHz real-time cores that Linux never touches. I moved the timestamp into one of those, and the clock offset dropped into the low nanoseconds.

#gps#pps#beaglebone#pru
Precision timing
October 27, 20254 min

The GPS that answers 0xFF when it has nothing to say

Reading a u-blox GPS over I2C frees the UART, but the I2C interface has no concept of idle. When the module has nothing to send, every read comes back as 0xFF filler. This is the small bridge that turns that into a chrony refclock.

#gps#i2c#chrony#timing

dnim.dev · built and broken by JR

WritingGitHubRSS