PPS input on GPIO pin RPI2.

Peter Ankerstål peter at pean.org
Tue Nov 22 20:44:22 UTC 2016


> On 22 Nov 2016, at 21:31, Ian Lepore <ian at freebsd.org> wrote:
> 
> Cool!  I notice we lost the CC to the arm@ list somewhere along the
> line.  I've added it back for this reply, so that other folks can see
> how to get this all configured.
> 
> For those following along... this setup uses a PPS to make the kernel
> clock very accurate, but also requires another (network-based) ntp peer
> to provide the time-of-day.  The minimum entries you need in ntp.conf
> for a configuration like this are:
> 
>   server 127.127.22.0 prefer
>   fudge  127.127.22.0 stratum 0
>   server <any network server> iburst prefer
> 
> Of particular importance is that the 'prefer' keyword is needed on the
> pps (127.127.22.0) server and any one of the network servers.
> 
> For a pure GPS solution that doesn't require another network ntp server
> to number the seconds, the 'gpsd' port knows how to talk to most gps
> receivers via a serial connection.  That's about all I know about gpsd.
> 

Actually ntpd knows how to interpet NMEA (including timestamps) output which is usually output on the serial interface of your GPS.

All you need to do is to hook up it to the serial interface of your machine running ntpd and link your serial device to /dev/pps1 for example.

and then have something like this in ntp.conf:
server 127.127.20.1 mode 17
fudge 127.127.20.1 time1 +0.140

the first line tells ntpd to look for NMEA on /dev/pps1 and some settings about baudrate and so on. 
the second line is to compensate for the delay of the serial interface which you will have to figure out in some way. 

More information about this here: http://support.ntp.org/bin/view/Support/ConfiguringNMEARefclocks


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4189 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20161122/e9ed442e/attachment.bin>


More information about the freebsd-arm mailing list