[ntp:questions] NTP NMEA driver

rajputajay84 at gmail.com rajputajay84 at gmail.com
Thu Feb 6 09:58:13 UTC 2014


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.

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.

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

Thanks & Regards,
Ajay



More information about the questions mailing list