Mail Archives: djgpp/2002/09/13/10:31:37
Has anyone ever tried calling uclock() from inside an interrupt handler?
I have an interrupt handler which (among other things) handles an interrupt
generated by an encoder used to calculate the speed of a running printing
press. In order to calculate this speed with any significant accruacy, I
need the timing resolution of the uclock() function. However, uclock()
appears to be less than accurate when called within my handler. I have timed
the frequency of our interrupt handler with an oscilloscope and found it to
be repeatable to within 0.1%, but the timings I'm calculating using uclock()
occasionally make very wild fluctuations.
Any suggestions?
- Raw text -