[ntp:questions] Two GPIO PPSes on Raspberry Pi

unruh unruh at invalid.ca
Thu Feb 28 23:39:48 UTC 2013


On 2013-02-28, Chris Adams <cmadams at hiwaay.net> wrote:
> Once upon a time, Ralph Aichinger  <ralph at pangea.at> said:
>>Has anybody *two* GPIO PPS devices on different GPIO 
>>pins on their Raspberry Pi? Would a setup like this
>>enable the ntpd to check the devices against eachother
>>(or probably more likely give an idea of interrupt
>>handling capabilities)?
>
> Remember: a man with two clocks never knows what time it is.
>
> If they are the same, everything's great; if they are different, what do
> you do?

Since both are supposed to indicate exactly the same time to nanosecond
accuracy, you know something is seriously wrong somewhere. Exactly where
you may not know, but you know that you should not be trusting the
times. Of course, you do have to take into account the fact that the
sources are demanding recognition from your computer at exactly the same
time, and your computer does not like that. Thus it is very possible
that this will cause the two to give times that differ by many micro
(not nano) seconds. If you can persude your system to service the
interrupts on two separate processors, you may even be able to get them
to agree to sub microsecond precision, but I have no idea if or how you
could force your system to use two different processors to process the
interrupts. 

Of course if the purpose is to provide redundancy, rather than testing,
then two clocks are problematic for precisely the reason you give. 



More information about the questions mailing list