LKM Timemark Driver for PC parallel ports with refclock_trimble now available for testing

Trevor N. trv-n at comcast.net
Mon Sep 10 00:17:44 UTC 2018


I modified the pps_parport Linux Kernel Module to produce pulses in
addition to receiving them.  It's different from the existing
pps_gen_parport in a few ways:
*works with multiple parallel ports
*timestamps assert or clear edge instead of just asserting at the top
of the second without timestamping
*pulse timing is adjustable
*assert and clear data values are configurable

It is able to produce a pulse as narrow as 800ns with my hardware, a
PCIe parallel card in a fast amd64 machine. The timestamps are
accessed through the PPSAPI as normal. I still need to make some
documentation, but all the load-time parameters are described in the
driver source.

I also added a few optional features to the standard input mode:
* interrupt line polling to eliminate interrupt latency
* local echo for measuring capture latency with an external counter
* interrupt masking to allow operation with ports that have
level-triggered interrupts


I finally found some time to get the refclock_trimble driver in a
usable state for testing the modified pps_parport driver. It's
available at:
https://gitlab.com/trv-n/ntpsec
Usage instructions are located near the bottom of the
docs/driver_trimble.txt file. Only the ntpd/refclock_trimble.c and
docs/driver_trimble.txt files have been modified.

I'm currently testing with an Acutime 2000. If anyone would like to
try the driver out, there are several 2000s available on everyone's
favorite auction site. Unfortunately the RS232-to-RS422 converter
(37071-00) is expensive, and the cable connecting the two isn't
readily available. I ended up having to make a converter and cable.
I'll make some information available on the converter eventually, but
it's pretty easy to build from the information in the receiver manual.

The Trimble Thunderbolt does not have an event input, so it can't be
used for testing the kernel driver. An EndRun Technologies Praecis
Cf/Ct/II can be used to test, but a custom cable and possibly a level
shifter will need to be built. I have a Cf that I'll be testing soon,
along with a Palisade and Acutime Gold.

Since it was easy to add support for the kernel driver into the
trimble refclock driver, it may be worthwhile to add it to other
drivers, but I'm pretty sure the only other non-trimble driver that
has support for receivers with timemark-type inputs is the one that is
being worked on by MLewis. I'll take a look at it and see if it is
using the PPSAPI in a similar way -- it may be possible to use the
modified parallel port kernel module on PC hardware with that refclock
driver as well as the GPIO-type kernel driver he's working on.



More information about the devel mailing list