Additional pps-gpio

Achim Gratz Stromeko at nexgo.de
Thu Jan 25 17:46:46 UTC 2018


Hal Murray via devel writes:
> You might learn something by connecting the same PPS signal to two pins and 
> comparing the time stamps.  The difference is a lower bound on the latency.

If I find the time, yes.

> Most GPSDOs produce a narrow pulse, 10 or 20 microseconds.  You might learn 
> something by capturing both edges and looking at the difference.  Maybe most 
> of the code will still be in the cache.

I've configured all GPS to produce at least 10ms long pulses as I found
that the rasPi 1B+ would otherwise sometimes miss a pulse.  I think the
reason is that while the interrupt itself is generated on the edge of
the pulse, the code in the handler actually looks at the live signal on
the pin, so if the handler takes too long getting there it might read an
inactive signal and punt.  But I've not actually looked at the code.
The latency (especially at the long end) is better for the newer rasPi,
but still reaches into the double-digit millisecond range.

> With 2 GPS devices, I'd expect the PPS pulses to wander back and forth.  If 
> you are locked on to pps0 and the order of  the pulse arrival changes, I'd 
> expect a slight jump in timing.  It would be interesting to see if that is 
> significant.

As I said, I'm not sure the rasPi would resolve that.  Anyway, for that
particular application it would be better to have a specialized gpio-pps
device driver that looks at multiple pins in parallel.  It would get
triggered on the first edge, then poll until it sees at least half the
observed inputs active and timestamp that.  The newer rasPi might be
capable of providing timestamps for the first, median and last pulse to
get an indication of how good the separate GPS agree.

But my intended application really is that I want to get both the front
and back of the DCF77 pulse timestamped (I have both the positive and
negative polarity available), and the back never coincides with the
"true" PPS anyway.

> I'd expect another step if the timing difference between pulses is such that 
> it changes from 1 interrupt to 2.  The two interrupt case will add the time 
> to return from an interrupt and take the second one.  Maybe a one-shot with a 
> knob so you can adjust the delay and plot the difference.

Well if I'm going to do that I'd use a time interval counter and not the
rasPi.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves



More information about the devel mailing list