[time-nuts] Embedded NTP servers?

Michael Tharp gxti at partiallystapled.com
Sun Aug 19 15:21:21 UTC 2012

Greetings nuts,

All this recent NTP discussion has me thinking about a dedicated NTP 
server again. The usual solution is to use commodity hardware of some 
persuasion (PC, mini-itx or even ARM) running ntpd, but I'm thinking we 
can do better. The only reason a full ntpd is needed is for its software 
PLLs that measure and compensate for deficiencies in the local 
oscillator. But if that local oscillator is replaced by a disciplined 
10MHz clock, and a coincident pulse-per-second and NMEA from the GPSDO 
fed in, then a reasonably fitted microcontroller should do the trick.

I happen to have a Ethernet-enabled widget I put together for another 
project as a kind of drop-in module, built on a PIC18F66J60 which has a 
built-in 10mbit Ethernet controller. The problem with it seems to be 
relatively poor and unpredictable packet servicing latency. Usually 
pings are 1.02ms but with some significant deviation. I imagine a lot of 
the deficiencies with this arrangement come from the vendor-supplied IP 
stack, which is not latency-optimized, but also the 10mbit link 
contributes some "quantization" type problems. Microchip also makes a 
100mbit-capable standalone controller, ENC624J600. I'd probably use that 
and pair it with any 72MHz ARM microcontroller. The micro would be 
clocked by a (multiplied) 10MHz disciplined input and the 
pulse-per-second would come in on a "input capture" channel that can 
timestamp the pulse relative to a local counter. And since ntp is such a 
simple protocol, it should be pretty easy to write a appropriate ntp 
server routine that just hands out the time from GPS, including leap 
second indications.

Thoughts? Has it been done before, preferably with open source? I'd love 
to make it myself but I have to finish the GPSDO first :-)

-- m. tharp

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