[LinuxPPS] PPS/ntpd fails on fresh startup

Rodolfo Giometti giometti at enneenne.com
Tue Oct 14 14:05:49 CEST 2008


On Tue, Oct 14, 2008 at 01:18:30PM +0200, Luca Bertagnolio wrote:
> With a stable machine, with nptd running OK, I stopped ntpd and tried
> running this short script:
> [snip]
> so things seem OK to me, the source gets created and removed when ppsldisc runs,
> and the 200ms is quite nicely aligned with the second.

Ok.

> Running the same script after a fresh reboot gives very similar results:
> [snip]
> In this case, you can still see the 200ms PPS pulse though the internal
> clock is not aligned with the second as in the previous log.

Good! SO LinuxPPS seems to work properly, doesn't it?

> Now, since it's a fresh reboot and I want to start ntpd again, I launch the
> script which says:
> [snip]
> PPS assert at 132539 on source #0
> PPS event on source 0 at 1223982506.952248900
> capture clear seq #6 for source 0
> PPS clear at 132589 on source #0
> PPS_GETCAP: source 0
> PPS_SETPARAMS: source 0
> PPS_GETCAP: source 0
> PPS_SETPARAMS: source 0
> PPS_FETCH: source 0
> timeout 0.000000000
> PPS_FETCH: source 0
> timeout 0.000000000
> PPS_FETCH: source 0
> timeout 0.000000000
> PPS_FETCH: source 0
> timeout 0.000000000
> 
> with the last two lines going on forever.

Here seems that the IRQ or PPS have been disabled...

> Stopping and restarting ntpd the second time gives a very different result:
> 
> PPS source #0 removed
> source serial1 got cdev (253:0)
> new PPS source serial1 at ID 0
> PPS source #0 "/dev/ttyS1" added
> PPS event on source 0 at 1223982804.194687
> capture assert seq #1 for source 0
> PPS assert at 195808 on source #0
> PPS event on source 0 at 1223982804.200196123
> capture clear seq #1 for source 0
> PPS clear at 195858 on source #0
> PPS event on source 0 at 1223982805.195162
> capture assert seq #2 for source 0
> PPS assert at 196058 on source #0
> PPS event on source 0 at 1223982805.200194922
> capture clear seq #2 for source 0
> PPS clear at 196108 on source #0
> PPS event on source 0 at 1223982806.194799
> capture assert seq #3 for source 0
> PPS assert at 196308 on source #0
> PPS event on source 0 at 1223982806.200195398
> capture clear seq #3 for source 0
> PPS clear at 196358 on source #0
> PPS event on source 0 at 1223982807.194436
> capture assert seq #4 for source 0
> PPS assert at 196558 on source #0
> PPS event on source 0 at 1223982807.200195035
> capture clear seq #4 for source 0
> PPS clear at 196608 on source #0
> PPS event on source 0 at 1223982808.194074
> capture assert seq #5 for source 0
> PPS assert at 196808 on source #0
> PPS event on source 0 at 1223982808.200194672
> capture clear seq #5 for source 0
> PPS clear at 196858 on source #0
> PPS_GETCAP: source 0
> PPS_SETPARAMS: source 0
> PPS_GETCAP: source 0
> PPS_SETPARAMS: source 0
> PPS_FETCH: source 0
> timeout 0.000000000
> PPS_FETCH: source 0
> timeout 0.000000000
> PPS_FETCH: source 0
> timeout 0.000000000
> PPS_FETCH: source 0
> timeout 0.000000000
> PPS_FETCH: source 0
> timeout 0.000000000
> PPS event on source 0 at 1223982809.197062
> capture assert seq #6 for source 0
> PPS assert at 197058 on source #0
> PPS_FETCH: source 0
> timeout 0.000000000
> [snip]
> ..and ntpd now works fine.

Yes, here the IRQ or PPS are ok.

> Looks like ntpd might have some initialization issues, maybe? BTW,
> this happens with both a 4.2.4p4 and a 4.2.5p135 build.

Yes. If I well remember some GPS antenna should be enabled for PPS
signaling, maybe something there is wrong?

> Happy to do any test you believe might be useful.

Try to take a look into your NTPD GPS driver and try to understand
where the IRQ or PPS are disabled.

Do you know if other people with your same GPS antenna have got
similar problems?

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti at enneenne.com
Linux Device Driver                          giometti at linux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti



More information about the LinuxPPS mailing list