gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] Problems processing pps from Maestro A2235 gps


From: Gary E. Miller
Subject: Re: [gpsd-users] Problems processing pps from Maestro A2235 gps
Date: Fri, 8 Jan 2016 11:57:41 -0800

Yo Winfried!

On Fri, 08 Jan 2016 17:08:35 +0100
Winfried <address@hidden> wrote:

> For a few days I have been struggling to sync the ntpd daemon to the 
> Maestro A2235 gps module on an embedded device.

Ouch.
> 
> The A2235 sends out a 0.2 sec long pps pulse every second. However
> the designer of the board placed an inverter between the PPS signal
> and the GPIO pin that receives it.

That PPS pulse does not look uncommon.

> So in the device tree I added the 
> 'assert-falling-edge' property to trigger on the falling edge of the 
> inverted signal.

No need, gpsd auto detects the propoer PPS edge.  And there is a bug
in linux kernels for RasPi that ignore that property.
 
> The KPPS seems to work fine, a PPS event is generated every second.

Which is a bug, you should get two every second, one for rise, and one 
for fall.
 
> However gpsd always reports very large PPS offsets, usually in the
> range -0.8 to -1.2 seconds. This offset stays more or less the same
> until I restart gpsd. I tried running ntpd -qg first, but that didn't
> help.

Not unreasonable for an offset to be that large.  That is what the
ntpd fudge's are for.  Just remove any consistent offset and you are good
to go.

> When I run gpsd with debug level 9 I see that the pulse is classified
> as an invisible pulse:

Ah, yes, the linux kernel for some RasPi, and other embedded devices,
has a known bug that they only detect one edge, not both.  It is noted
the gpsd doc and a patch was submitted to Linux almost a year ago.

> When I start ntpd it very quickly classifies both the serial gps time
> as well as the pps shared memory segments as false tickers.

How do you feed them both to ntpd, why?  YOu should be feeding both
serial and PPS time in ntpshm.

> Can anybody tell me what is going on here ? Does the inverted pulse 
> confuse gpsd ?

Nope, inverted time is fine.  But you seem to  have the kernel bug so
kernel KPPS can not do its job and only sees one edge, with no working
option to select which edge.  So just use ntpd fudge's to adjust.

This is all documented in the time howto.

> gpsd version used: 3.15
> gpsd started with: /usr/sbin/gpsd -n -N -D9 /dev/ttymxc2 /dev/pps1

That looks good.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

Attachment: pgpn783kYV6u7.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]