[time-nuts] How to get PPS from ublox mini-PCI GPS to APU2 SoC serial port for ntpd

Paul tic-toc at bodosom.net
Mon Aug 15 16:57:27 EDT 2016

On Mon, Aug 15, 2016 at 5:35 AM, STR . <strykar at hotmail.com> wrote:

> Pardon my ignorance, I'm not sure what COM port the PPS is tied to or what
> you mean.

I think there's some confusion.

Normally the PPS input to Linux (I'm not sure about FreeBSD) is tied to the
DCD pin in a serial port.  The PPS code is connected to the interrupt from
the DCD.  It can be tied to another pin (DSR or CTS I forget), a parallel
port or a GPIO pin (a la RaspberryPi or BeagleBone).  Anything other than
DCD normally requires a specific kernel build.  The APU2c has an I/O part
connected via an LPC bus.  It's essentially 4 UARTS.  UART-a is connected
to a DE-9 connector via a level shifter.  All signals are present.  UART-b
is brought to J3 unshifted.  Even though J3 has five pins only transmit,
receive and ground are connected.  UARTs "c" and "d" are brought to J17
either as 18 GPIO signals or 2x8 RS-232 signals (the latter requires
non-standard bios code to set up the chip).  So if we imagine that you want
to use the DCD pin on UART-c you'd configure the GPIO pins as serial and
connect to pin 9 on J17.  Be advised that the specifics in the previous may
be wrong so check the schematic.

Now if you want to read the correct time as a sentence from the GPS you'd
connect the Tx/Rx pins on your module to the corresponding pins on a 3V3
serial port.  Continuing to use UART-c that would be pins 7 and 8 on J17.

Now regarding jitter.  Pascal suggests that the jitter involved in using
his take on the LPC connected super i/o part might be too high.  As noted
someone said that was the case with the APU1.  While I wouldn't be
surprised if that were still true with the APU2 you might find the time
"good enough".  Trust but verify.

Finally, these boxes are intended to be routers (hence the three network
interfaces) not time-servers and unless you're irrevocably wedded to the
miniPCIe in APU2 route there are probably better choices for time servers.

More information about the time-nuts mailing list