[time-nuts] First success with very simple, very low cost GPSDO, under $8

Hal Murray hmurray at megapathdsl.net
Wed Apr 9 14:34:19 EDT 2014


> But I think you over looked one point that makes this project easier:  We
> KNOW 100% for certain that the interrupts happen only once per second.  So
> the foreground code knows for certain it has exclusive access to shared
> variables for a given period of time.  There is zero chance of a problem in
> the next .999 seconds after an interrupt. 

Actually, you don't know that.  You know that's the way it's supposed to 
work, but there are all sorts of ways that things can (and do) screw up and 
making that sort of assumption can lead to problems that are very hard to 
debug.


It would be interesting to compare the size and complexity of simple code 
that doesn't have much error checking with defensive code that checks all 
sorts of things.  Sometimes a sanity check is a good way to explain a subtle 
point.

-- 
These are my opinions.  I hate spam.





More information about the time-nuts mailing list