Is it a good idea to use a usb-serial adapter for PPS? Yes, it is.

Ross Alexander rwa at athabascau.ca
Thu Aug 15 22:03:02 UTC 2019


In <24b0eaf25b64d6098b390df092866c69e352d859.camel at freebsd.org>,
Ian Lepore writes:

> [... ed.] I arranged to use a very stable nearly-drift-free
> frequency source instead of a cheap crystal for counting time in the
> kernel.

You have my complete and focussed attention.  Say on.

> [WRT USB 2, ed.] the polling happens in time slots that are 125
> microseconds wide.  There's just no reason for a lot of jitter or
> latency.

125 microseconds is a lot of jitter.  Latency is a don't care, you can
fudge that out.  Looking at a Pi 1b+, running some consumer grade
Ublocks GPS module, a five year old Linux, and with a view of only
half the sky (but using PPS on a GPIO pin):

> autopsy:/u0/rwa > ntpq chime
>
> ntpq> lpee
>      remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> oPPS(0)          .PPS.            0 l    8   16  377    0.000    0.001   0.002
> *SHM(0)          .GPS.            5 l    6   16  377    0.000  419.464 310.013
>
> ntpq> rl &1
> associd=10146 status=911a conf, reach, sel_falsetick, 1 event, sys_peer,
> srcadr=PPS(0), srcport=123, dstadr=127.0.0.1, dstport=123, leap=00,
> stratum=0, precision=-20, rootdelay=0.000, rootdisp=0.000, refid=PPS,
> reftime=e1005453.fffff7a5  Thu, Aug 15 2019 15:59:47.999,
> rec=e1005454.debc0ef4  Thu, Aug 15 2019 15:59:48.870, reach=377,
> unreach=0, hmode=3, pmode=4, hpoll=4, ppoll=4, headway=0, flash=00 ok,
> keyid=0, ttl=0, offset=0.001, delay=0.000, dispersion=0.233,
> jitter=0.002,
> filtdelay=     0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00,
> filtoffset=    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00,
> filtdisp=      0.00    0.24    0.48    0.72    0.96    1.20    1.44    1.68
>
> ntpq> rl
> associd=0 status=0413 leap_none, sync_uhf_radio, 1 event, spike_detect,
> version="ntpd 4.2.7p397 at 1.2483-o Sun May  3 05:32:19 UTC 2015 (1)",
> processor="armv7l", system="Linux/4.1.12-v7+", leap=00, stratum=6,
> precision=-19, rootdelay=0.000, rootdisp=733.955, refid=SHM(0),
> reftime=e1005456.debbfb5d  Thu, Aug 15 2019 15:59:50.870,
> clock=e100545c.084cd64c  Thu, Aug 15 2019 15:59:56.032, peer=10147, tc=4,
> mintc=3, offset=0.000921, frequency=0.047, sys_jitter=310.013202,
> clk_jitter=0.000, clk_wander=0.000

The jitter is expressed in units of 1 millisecond, unless I am badly
mistaken; for which possibility I apologize in advance.

(as an aside, has editing quotation text gone utterly out of style?
Present company excepted, of course.)

regards,
Ross

============================================================================
Ross Alexander, (780) 675-6823 desk / (780) 689-0749 cell, rwa at athabascau.ca
                         54.71593 N 113.30835 W

     Order is simply a thin, perilous condition
     we try to impose on the basic reality of chaos.

        -- William Gaddis, _J R_
--
This communication is intended for the use of the recipient to whom it is addressed, and may contain confidential, personal, and or privileged information. Please contact us immediately if you are not the intended recipient of this communication, and do not copy, distribute, or take action relying on it. Any communications received in error, or subsequent reply, should be deleted or destroyed.
---


More information about the freebsd-arm mailing list