AnsweredAssumed Answered

Want a 32 bit timer but 24 bit will do

Question asked by therealfreegeek on Dec 21, 2015
Latest reply on Dec 22, 2015 by Hui_Ma

Looking through the data sheets for the K26 it looks like you cannot cascade the FTM timers on Kinetis (although docs I have found on the FTM suggest it was designed with this in mind). Now I really would like a 32 bit input capture feature but 24 bit would do, so I was thing of doing this.

 

I need to count accurate time between infrequent pulses

 

FTM1 clocked at the maximum bus speed, 60MHz

FTM2 clocked at 60MHz via the divide by 128 prescaler

 

Feed my input edge to I/C on both timers then combine the results of both captures to give a 24 bit result, I will only need to service the timer overflow of FTM2 to expand the result up to 32 bits in software and save on the "Timer overflow interrupts" by a factor of 128.

 

Does this make sense, or is there a better way?

Outcomes