Want a 32 bit timer but 24 bit will do

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Want a 32 bit timer but 24 bit will do

800 次查看
therealfreegeek
Contributor IV

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?

0 项奖励
回复
1 回复

565 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

The FTM counter is 16-bit, which does not support chained timers.

For customer is using input capture mode, if customer could consider to use PIT timer with external pin interrupt.

PIT timer counter is 32-bit and supports chained mode.

Wish it helps.

best regards,

Ma Hui

0 项奖励
回复