[ntp:questions] PPS via USB-to-serial adapter

Jakob Bohm jb-usenet at wisemo.com.invalid
Mon Aug 12 15:16:19 UTC 2019

On 11/08/2019 15:44, Per Hedeland wrote:
> Hi,
> Since the idea of using a USB-to-serial adapter for PPS is often
> dismissed here as more or less pointless/useless, (due to the inherent
> delays in the USB communication AFAIU), I found this recent post to a
> couple of FreeBSD mailing lists quite interesting:
> https://lists.freebsd.org/pipermail/freebsd-usb/2019-August/016078.html
> TL;DR^2 The author carried out a pretty sophisticated (IMHO) test with
> two different USB-to-serial adapters feeding PPS to ntpd, and found an
> offset of some 200 usec with 20-30 usec jitter. You can of course tell
> ntpd to correct for the offset (once you know how large it is...), and
> the jitter doesn't seem too bad to me, although it is of course higher
> than for more "direct" connections.
> In subsequent discussion he pointed out that it is significant that
> the test was done on FreeBSD - while he would expect similar results
> on Linux, performance on Windows would be "all bets off" due to
> varying driver quality.
> --Per Hedeland

One of the hard parts is that the USB protocol is essentially polling at
either 1kHz (USB 1.1 speeds) or 4kHz (USB 2.0 ~280Mbps speed).  This may
be suitable for syncing around ms range.

Thus if the USB controller clock in the computer is running close to
its nominal speed, the delta between actual PPS pulse and USB event
reaching the computer will be almost constant, varying only by the
jitter and speed error of the USB controller clock, wrapping at 1000 or
250 usec.

I haven't checked the iMX.6 datasheet for its USB controller internals
(for example, does it take the frame clock from the 24MHz-derived bit
lock or the from another clock that is closer to the PPS-synced clock in
his experiments).

I also haven't grabbed a copy of the serial port adapter USB subclass
specification to check if there is something not happening at frame
boundaries somehow.


Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded

More information about the questions mailing list