[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [questions] GPS+PPS vs NTP server, why a huge offset ?




> On 17 Jun 2022, at 12:05, Dan Drown <dan-ntp@xxxxxxxxx> wrote:
> 
> Quoting Daniel O'Connor <darius@xxxxxxxxxxx>:
>> If you are using it for NTP then GPS+PPS over USB is quite adequate (from personal experience).
>> 
>> Ian Lepore (RIP) who worked for Micro Semi and worked on FreeBSD did a bunch of tests on a PPS over USB setup and found it more than
>> acceptable for keeping a PC in (good) time. Here's the thread: https://lists.freebsd.org/pipermail/freebsd-arm/2019-August/020263.html
> 
> That ntpq snapshot is a little bit misleading, the latency added by USB will vary depending on the offset between when the PPS happens and the next USB poll. The USB polls are relatively stable in the short term, depending on the host frequency driving USB. So the snapshot will only tell you the offset between all the PPS sources in that short timeframe, not how they wander over time.
> 
> Here's a measurement of that wandering from the USB device's perspective:
> https://blog.dan.drown.org/content/images/2017/07/usb-cdc-latency-zoom3.png
> 
> As long as you are ok with your time having an offset between ~0ms and ~1ms, PPS over USB (USB fullspeed) is acceptable. There are plenty of uses where that would be "good enough".

I would say it is good enough for the vast majority of cases. It unfortunately seems to be "received wisdom" that it's not great and people avoid it, when the fact is that it works exceptionally well for use cases where NTP is in use.

> I have more info on my blog post: https://blog.dan.drown.org/pps-over-usb/

Interesting reading thanks.

Personally I think to get significantly better than the simple GPS over USB case you need an input capture timer, but annoyingly it seems to be quite a rare feature in large SoCs (especially annoying since input capture timers are dime a dozen on microcontrollers).

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
-- 
This is questions@xxxxxxxxxxxxx
Subscribe: questions+subscribe@xxxxxxxxxxxxx
Unsubscribe: questions+unsubscribe@xxxxxxxxxxxxx