r/raspberrypipico • u/mungewell • 3h ago
Pushing TimePico NTP server to the limit. Chrony gives 5us RMS Offset!!
Following on from last week's "Nudge Lock" scheme...
I got the 'fractional us' code running within TimePico on both the WIZNET and Pico-2W boards. I discovered that the Pico-2W doesn't like 256MHz CPU frequency, so it's limited to 6bit fractional-us @ 128MHz CPU.
This gave some awesome results, even if I don't fully understand how to interpret them:
https://github.com/riblettmj/TimePico/issues/10#issuecomment-7084662839
Setup:
- 192.168.1.111 - Pico2 + WIZNET Hat, fed from GPS module. Ethernet to laptop via gigabit switch.
- 192.168.1.112 - Pico2 + WIZNET Hat, fed from same GPS module. Ethernet to laptop via gigabit switch.
- 192.168.2.102 - Pico2W (NoSelect), fed from same GPS module. Dedicated WiFi network to Laptop running Host-AP.
- 192.168.100.1 - StarLink terminal (NoSelect), remote over Ethernet and Ethernet-over-Powerline
With Chrony doing a blend of the two WIZNET modules, it reports 5.1us RMS offset (post processed to remove outliers this drops to 1.04us RMS offset) and a mean offset of 33.3ns.
I'd really appreciate some 'expert eyes' looking at this data set, and confirming which parameter/metrics are actually quotable as 'the true accuracy'...
The 'statistics' for the two WIZNET modules shows their time(s) symmetrically bouncing either side of the 'tracking' value. I assume this is just how Chrony interprets the data.
I don't have a more stable reference source than this, and being physically remote (on jittery StarLink internet) don't think I can utilize the public internet for one. Looks like the best solution might be for a GPSDO. "Dear Santa..."
I do have a Mosaic-X5 dev board which has Ethernet and PTP functionality, but when I've tested with this I've seen X5's time wander around (with respect to my TimePicos and StarLink) by a couple of ms. Most likely due to poor GPS antenna (and location), possibly a configuration error.
My task for the next week is to clean up this branch/code and submit a pull request.
