Jerry Girard

Extending Input Capture using timer overflow.

Discussion created by Jerry Girard on Jan 10, 2012
Latest reply on Jan 10, 2012 by bigmac

Does anyone have experience extending a timer using the overflow interrupt, say to 24 or 32-bits and beyond?

 

I am using the HCS08 TPM modules.  I have never done this and I am concerned about any pitfalls.

 

One concern would be using the timer within a non-related interrupt just before or after the overflow occurs, and then having a discontinuity problem.  If I am in an interrupt then I won't be able to service the overflow interrupt to increment the extending count unless I unmask the interrupts temporarily, but this could have other undesirable affects.

 

I don't want to add a bunch of strange code to get this to work.

 

What I'm trying to accomplish is extending the Input Capture to 24-bits.  I need the fine sub-microsecond accuracy, but I also need the extended time of up to 250ms.

 

Any insight or experience that anyone can share would be great.  Thanks.

Outcomes