[time-nuts] raspberry pi, pps & interrupts by kernel

folkert folkert at vanheusden.com
Sun Dec 14 15:56:26 UTC 2014


Hi,

> > I tested it...and could not get it to work. gpsd opens pps0 but strace
> > does not show me the regular ppsapi syscalls and also ppstest gives a
> > time out.
> 
> e.g. I did an strace and I did not see any PPS_FETCHs passing by.
> I verified with lsof that gpsd does have pps0 open.

With help from Hal I got it to work!
I thought you could just "poke" the gpio pin number in that /sys
virtual file. You can't. The bcm2708 code needs to know the pin number
at boot time.
Then, you can't get the pps via gpsd: when gpsd opens /dev/ttyAMA0 to
talk to the gps, a new /dev/pps1 is created, for that AMA0 device. That
pps1 is not the one you need; the serial port on the raspberry pi has no
dcd pin so pps1 points to nothing. Yes it is connected to the ldisc but
that has no (hardware) dcd pin connected to it.
So long story short: you need to configure an atom driver in ntpd which
then correctly opens /dev/pps0 and then the share memory coupling with
gpsd. Yeah or connect ntpd directly to /dev/ttyAMA0 but then you'll
miss the possibilities of running the nice gpsmon application.


Folkert van Heusden

-- 
----------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com



More information about the Time-nuts_lists.febo.com mailing list