[time-nuts] ``direct'' RS-232 vs. RS-232 via USB vs. PPS decoding cards
Tom Van Baak
tvb at LeapSecond.com
Tue Feb 14 14:31:49 EST 2017
> Hence, wouldn't Best Practice be boxes loaded with only the bare OS and
> software for the time-related tasks?
If you find yourself in a situation like this -- where your timing seems to improve the less load you have -- that's a sure sign that you're doing the timing wrong in the first place.
Best practices are to do 1PPS timing in hardware using capture registers (which almost every microcontroller has). That way there's a separation between the critical act of *making* a timing measurement from the non-critical act of *delivering* the measurement result the operating system. You still use interrupts -- but now the purpose of the interrupt is simply to indicate that a fresh measurement result is ready, rather than the interrupt itself being the measurement. The result is that the time stamp / capture register method is immune to interrupt latency and system load issues.
Best practices number two are to replace the crystal on the motherboard with a TCXO or OCXO. Then, with the help of NTP, your computer is finally acting like a GPSDO.
More information about the time-nuts