Re: LPC2138 timers



"Frank van Eijkelenburg" <someone@xxxxxxxxxxxxxxxx> wrote in message
news:44A3FC9B.5010001@xxxxxxxxxxxxxxxxxxx
Peter Dickerson wrote:
[snip]

You shouldn't need to reset the timer at all. You want it to keep going
so
that the results are entiely based on hardware timing without and
latency
issues (except to respond to the interrupt before the next capture is
expected).

Peter



Hi Peter,

thank you for the idea. If the timer was used only for measurement, it
would
work I guess. However, the timer is also used as timeout timer (if for a
long
period no edges are detected a timeout occures). I could manually detect
if the
timeout period is elapsed, but this should be done outside the interrupt
service
routine. Anyway, automatically reset the timer would be the best solution,
but I
am afraid it isn't possible?!

So use two timers. Don't reset the input capture one but reset the timout
one. That way you'll get both the timeout and the timing to the nearest clk.

Peter


.


Quantcast