gpsd-users
[Top][All Lists]
Advanced

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

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


From: Gary E. Miller
Subject: Re: [gpsd-users] ppsthread.c broken for FreeBSD gpio
Date: Tue, 14 Mar 2017 15:07:22 -0700

Yo Tony!

On Tue, 14 Mar 2017 14:37:29 -0700
"Tony Hain" <address@hidden> wrote:

> > 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. 

Well then, luck of the draw, Some mobos work with low voltage and
short pulses, some don't.  When in doubt level shift and pulse stretch.

> > 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.

333 might work, 250 prolly better.  Or put in a dual 555.

> > 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.

Yup, and that case works fine on Linux/RasPi, so I suspect your problem
is elsewhere.


> If I can follow the code path I will try to identify the specific
> place it goes wrong on FreeBSD.

That would be good, we have not had FreeBSD testers in a while.


> > > > 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 fail.

That snippet is not near an OS specific block.  It only depends on
HAVE_SYS_TIMEPPS_H.

The other OS specific to watch out for is: TIOCMIWAIT

The main linux conditional is the linux code autocreates PPS devices,
but you already knew that.

RGDS
GARY
---------------------------------------------------------------------------
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

Attachment: pgpmhdMGMmki8.pgp
Description: OpenPGP digital signature


reply via email to

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