Date: Thu, 15 Aug 2019 13:46:32 +0200 From: Per Hedeland <per@hedeland.org> To: Ian Lepore <ian@freebsd.org> Cc: freebsd-arm@freebsd.org Subject: Re: Is it a good idea to use a usb-serial adapter for PPS? Yes, it is. Message-ID: <0426fc8b-5398-d8ab-561e-7823c24403a5@hedeland.org> In-Reply-To: <523b6f0a0fa5f2aeec298fa74df25d3c4af66acc.camel@freebsd.org> References: <alpine.BSF.2.21.99999.352.1908071046410.98975@autopsy.pc.athabascau.ca> <69a9bed3-4d0a-f8f6-91af-a8f7d84ee307@hedeland.org> <345bae77417c2495f55799b4c7ca2784f4ece9ed.camel@freebsd.org> <7312032d-2908-9414-0445-6b442c3a02e5@hedeland.org> <523b6f0a0fa5f2aeec298fa74df25d3c4af66acc.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2019-08-09 22:17, Ian Lepore wrote: > On Fri, 2019-08-09 at 21:36 +0200, Per Hedeland wrote: >> On 2019-08-09 17:28, Ian Lepore wrote: >>> On Thu, 2019-08-08 at 22:26 +0200, Per Hedeland wrote: >>>> On 2019-08-07 18:53, Ross Alexander wrote: >>>>> In Message-ID: < >>>>> B9EFA4D4-C1AD-4181-B421-F6BD53434FA5@dons.net.au>, >>>>> someone wrote [sorry, attrib trail is a little blurry ed.]: >>>>> >>>>>>> Most people are not worried about their kernel clock being >>>>>>> 200 >>>>>>> microseconds off from UTC, even if they're using the PPS >>>>>>> signal >>>>>>> from a >>>>>>> GPS receiver. So I think most people should feel >>>>>>> completely at >>>>>>> ease >>>>>>> using a USB serial adapter as the input device for a PPS >>>>>>> signal. >>>>> >>>>> Some people do worry, although getting PPS to work over USB is >>>>> a >>>>> fine >>>>> first step and I'm grateful for the breadcrumb trail. >>>> >>>> For those that do worry, you can of course tell ntpd to correct >>>> for a >>>> semi-fixed offset (via the 'time1' option to the 'fudge' command) >>>> - >>>> once you know how large the offset is... More important is a low >>>> jitter, and 20-30 microseconds seems quite good. [snip] >> Would you object to >> me posting an article with a *link* to your message >> (i.e. >> https://lists.freebsd.org/pipermail/freebsd-arm/2019-August/020263.html >> ) >> in the newsgroup? > > It might be better to use the link to the copy I sent to the freebsd- > usb list, since it's more directly on-topic: > > https://lists.freebsd.org/pipermail/freebsd-usb/2019-August/016078.html > > I also think it would be wise to add a caveat that the results are for > FreeBSD. I would expect linux performance to be similar. But for > Windows, all bets are off; Windows drivers for usb-serial devices are > said to vary wildly in quality depending on the vendor. OK, I took it to the newsgroup, and while the initial comments were pretty much "it's impossible to get good results via USB" even though your test seemed to show that it wasn't, after some discussion it seems quite strange to me too that you get a pretty much fixed offset and low jitter, since the USB communication including DCD/CTS detection is apparently based on polling from the host. I have a theory that your making the kernel clock be based on the 10 MHz clock also ended up locking the USB poll frequency to that clock, and thus to the PPS signal - this would certainly explain the result. Do you think this is a possibility? Would it be possible for you to re-run the test without modifying the kernel clock? (I do understand that the results will be harder to interpret with the drift, and ntpd's correction of it, coming into play.) --Per
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0426fc8b-5398-d8ab-561e-7823c24403a5>