Re: LPC2138 timers
- From: "Peter Dickerson" <first{dot}surname@xxxxxxxxx>
- Date: Fri, 30 Jun 2006 07:52:35 GMT
"Peter Dickerson" <first{dot}surname@xxxxxxxxx> wrote in message
news:8jWog.9$Xp3.2@xxxxxxxxxxxxxxxxxxxxxxx
"Frank van Eijkelenburg" <someone@xxxxxxxxxxxxxxxx> wrote in messagegoing
news:44A3FC9B.5010001@xxxxxxxxxxxxxxxxxxx
Peter Dickerson wrote:[snip]
You shouldn't need to reset the timer at all. You want it to keep
sosolution,
latencythat the results are entiely based on hardware timing without and
wouldissues (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
work I guess. However, the timer is also used as timeout timer (if for along
period no edges are detected a timeout occures). I could manually detectif the
timeout period is elapsed, but this should be done outside the interruptservice
routine. Anyway, automatically reset the timer would be the best
but Iclk.
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
Alternatively, if the timer supports capture and compare then update the
compare value to be capture_value+timeout (modulo timer size) in the capture
interrupt. You should only get a compare interrupt if no edge has occured
during the timeout interval.
Peter
.
- References:
- LPC2138 timers
- From: Frank van Eijkelenburg
- Re: LPC2138 timers
- From: Peter Dickerson
- Re: LPC2138 timers
- From: Frank van Eijkelenburg
- Re: LPC2138 timers
- From: Peter Dickerson
- LPC2138 timers
- Prev by Date: Re: Wich 16-bit MCU?
- Next by Date: f to the V
- Previous by thread: Re: LPC2138 timers
- Next by thread: Re: LPC2138 timers
- Index(es):