PPS input on a generic GPIO pin on Raspberry Pi.

Karl Denninger karl at denninger.net
Fri Mar 4 17:04:19 UTC 2016

On 3/3/2016 12:57, Peter Ankerstål wrote:
> Hi!
> I have sort of exactly the same question as Erik:
> http://lists.freebsd.org/pipermail/freebsd-questions/2014-July/259055.html
> I have bought a https://learn.adafruit.com/adafruit-ultimate-gps and want to use the PPS output to discipline my clock.
> But the only source of information on how PPS works in FreeBSD I could find is this: https://docs.freebsd.org/doc/8.0-RELEASE/usr/share/doc/ntp/pps.html and it clearly states the two ways to provide a PPS signal. "The PPS signal can be connected in either of two ways: via the data carrier detector (DCD) pin of a serial port or via the acknowledge (ACK) pin of a parallel port”
> Since the Pi doesn’t have any DCD pin i would like to use a generic GPIO for this. There is a linux kernel module for this: http://lxr.free-electrons.com/source/drivers/pps/clients/pps-gpio.c?v=3.6
GPIO is supported on the Pi, I'm using it on 11-Current on my home
control software to drive relays on my pool hardware (e.g. valves,
heater, VFD motor drive, etc) and it is working very well.  I don't
believe tapping into that at the kernel level to expose a pps signal
(e.g. on /dev/pps or something of the like) would be very difficult at
all, since the low-level driver capability is already present.

If I get some free time I'll dig around a bit and see if I can cobble
something up.  It's of some interest to me as well since I have a GPS
clock here that currently talks to a serial port on an Intel-based
machine and being able to move that to a $35 "appliance" for NTP using
the Adafruit setup looks sort of attractive given that the Pi plus the
module would be under $100 all-in.

Karl Denninger
karl at denninger.net <mailto:karl at denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2996 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20160304/e5a1ccfa/attachment.bin>

More information about the freebsd-stable mailing list