[ntp:questions] NTP NMEA driver

Brandon Applegate brandon at burn.net
Fri Feb 7 15:04:07 UTC 2014


On Thu, 6 Feb 2014, rajputajay84 at gmail.com wrote:

> Dear Sir,
>
> I am trying to synchronize AM335x processor based linux 3.2 with Motorola GPS receiver using its Serial based NMEA frame and 1pps signal. I have connected nmea frame to ttyO1 port. I am using buildroot based filesystem for NTP configuration. NTP version used is 4.2.6p5.
>
> I have configured ntp.conf file for nmea driver 20 for nmea and 1pps options. (refer: http://www.eecis.udel.edu/~mills/ntp/html/drivers/driver20.html)
>
> # Ajay - for nmea driver 20
> server 127.127.20.0 mode 0 minpoll 4 maxpoll 4 prefer
> fudge 127.127.20.0 flag1 1 flag2 0 flag3 1 time2 0.500.

flag3 1 - this sets the NMEA driver to use kernel PPS.  So this is not a 
seperate PPS signal.  See below...

>
> time2 is set to 0.600 since delay between 1pps signal rising edge and end of nmea frame is approx 500ms.
>
> i am issuing below command for nmea driver 20 before starting ntp service:
>
> ldattach pps /dev/ttyO1.
>
> [   94.658905] pps_core: source OMAP-SERIAL1 got cdev (253:0)
> [   94.658935] pps pps0: new PPS source OMAP-SERIAL1
> [   94.663787] pps pps0: source "/dev/ttyO1" added
>
>
>
> Also, while kernel booted it already had registered pps for kernel line discopline as per below message:
> [    0.181427] pps_core: LinuxPPS API ver. 1 registered
> [    0.181427] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti at linux.it>
>
>
> ln -s /dev/ttyO1 /dev/gps0 (for linking ttyO1 to /dev/gps0 for nmea driver 20) (as per http://www.eecis.udel.edu/~mills/ntp/html/drivers/driver20.html)
> and
> ln -s /dev/pps0 /dev/gpspps0 (for linking pps0 to /dev/gpspps0 for nmea driver 20) (as per http://www.eecis.udel.edu/~mills/ntp/html/drivers/driver20.html)
>
> Now, when i start the ntp service, i get below output for ntpq -p command:
>
>
>     remote           refid      st t when poll reach   delay   offset  jitter
> ==============================================================================
> *GPS_NMEA(0)     .GPS.            0 l    4   16  377    0.000  4526.86 1269.17
>
> Problem: Though i have configured my ntp.conf file for nmea and 1pps both (using flag1 1), i do not see any entry for PPS in ntpq -p command.
> if kernel has registered pps0 as pps source, why there is not PPS entry. I have connected pps signal of 3.3v level to my dcd pin of ttyO1.

The PPS is 'integrated' in the GPS_NMEA source (via flag3).  Eventually 
you should get an 'o' next to it (if PPS is working).  Here is what I have 
on my system:

vom at ice:~$ ntpq -p | grep NMEA
oGPS_NMEA(0)     .GPS.            0 l    9   16  377    0.000    0.000   0.001

Also, get the pps utilities and you can run ppswatch against your pps 
device like this:

vom at ice:~$ sudo ppswatch /dev/gpspps0
trying PPS source "/dev/gpspps0"
found PPS source "/dev/gpspps0"
timestamp: 1391785256, sequence: 71, offset:  199993776
timestamp: 1391785256, sequence: 71, offset:  199993776
timestamp: 1391785257, sequence: 72, offset:  199999040
timestamp: 1391785257, sequence: 72, offset:  199999040
timestamp: 1391785258, sequence: 73, offset:  200002043
timestamp: 1391785258, sequence: 73, offset:  200002043
timestamp: 1391785259, sequence: 74, offset:  200002614
^C

Total number of PPS signals: 7
Maximum divergence: 200002614

You should also get some pps related output from 'ntpdc -c kerninfo'

vom at ice:~$ ntpdc -c kerninfo
pll offset:           -2.55e-07 s
pll frequency:        -3.515 ppm
maximum error:        0.007734 s
estimated error:      0 s
status:               2007  pll ppsfreq ppstime nano
pll time constant:    4
precision:            1e-09 s
frequency tolerance:  500 ppm


> Also, the offset in NMEA output continously increases insteed of reducing.

Please run ppswatch and see if you are indeed getting PPS into the kernel.

> Thanks & Regards,
> Ajay
>
> _______________________________________________
> questions mailing list
> questions at lists.ntp.org
> http://lists.ntp.org/listinfo/questions
>


More information about the questions mailing list