[Top][All Lists]

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

Re: [gpsd-users] ppsthread.c broken for FreeBSD gpio

From: Tony Hain
Subject: Re: [gpsd-users] ppsthread.c broken for FreeBSD gpio
Date: Tue, 14 Mar 2017 14:37:29 -0700

Gary E. Miller wrote:
> Yo Tony!
> On Mon, 13 Mar 2017 17:01:12 -0700
> "Tony Hain" <address@hidden> wrote:
> > > I have a trusty MR-350p,  That is clearly not the default setting
> > > for that model. Why do you have it set that way?  it will most
> > > likely fall into a deadband that is rejected as hard to quantify.
> >
> > The2.8v pulse coming out of it was inadequate to drive the rs232 on
> > the 386's, so I stuck a driver in.
> A common mistake, and the standard solution.
> > That didn't do anything useful
> > because the 2us pulse was too short to be seen by the ntp pps driver,
> I have no trouble detecting 1 microSec pulses.  I'd look again at your
> motherboard.

The motherboard that was built for was retired/recycled 5 years ago. There was 
no driving need to change it or check the existing board, so it might work 
without shaping. 

> > so I put a 555 in.
> Also a common solution.  Then set it to 100 micro Sec and you are done.

If I rebuild it, a more likely value would be 330ms because the blinking led 
has been a valuable diagnostic tool in its own right. Now that I know there is 
an issue, I will look at the gpsd edge detector and make sure whatever it is 
doesn't fall into the nebulous zone. 

> > At the time (~10 years ago when the oncore died) I didn't know about
> > the gpsd edge detector, so I shot for 50% duty cycle
> Bad idea.  There are 0.5 HZ GPS that output one edge each second.

Didn't know that, and gpsd was not a design goal at the time. 

> You can not remove that from gpsd, you will break too many existing
> configurations.
> So, at this point, game over, fix your pulse width.

The current issue is that the FreeBSD gpio pps driver is single edged 
assert-only like the Rpi linux one, so width is irrelevant on the BBB. Later 
this week I will boot into linux on the BBB and put the same configuration of 
gpsd/ntpsec on it to document the differences. If I can follow the code path I 
will try to identify the specific place it goes wrong on FreeBSD.

> > > Rally?  Where?ode snips please.
> >
> >                 /* brain damaged pps-gpio sometimes never fills in
> > clear *prev_clock_ts = pi.assert_timestamp;
> >                 *prev_clock_ts = pi.clear_timestamp;
> >         *clock_ts = pi.assert_timestamp;
> That has been vetted by a ton of people, don't touch that.

Never intended to, but if it is in a linux-only if-def block, the non-linux 
systems that do the same gpio single-edge thing are effectively designed to 


> ---------------------------------------------------------------------------
> Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
>       address@hidden  Tel:+1 541 382 8588
>           Veritas liberabit vos. -- Quid est veritas?
>     "If you can’t measure it, you can’t improve it." - Lord Kelvin

reply via email to

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