K118 Capture timer

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

K118 Capture timer

跳至解决方案
1,004 次查看
rvalente
Contributor III

Hello Mates, 

i'm looking to migrate a simple project for the K118 to the STM32 micro but need some help with the capture architecture. I need to read four square waves from 0 to 3KHz. In the STM32 two 16 bit timers are chained and a 10MHz clock is fed to the timers. The rising edge makes a interrupt to read the capture value. In the K118 can a timer have 4 interrupt capture channels?

Greetings, Renan

0 项奖励
1 解答
998 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Renan,

Each FTM channel can be configured for input capture.

For more information, please take a look at the RM, Section 47.5.5 Input Capture Mode.

You can use SDK, this example shows use of FTM Input capture: ftm_signal_measurement_s32k118

 

Regards,

Daniel

在原帖中查看解决方案

3 回复数
999 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Renan,

Each FTM channel can be configured for input capture.

For more information, please take a look at the RM, Section 47.5.5 Input Capture Mode.

You can use SDK, this example shows use of FTM Input capture: ftm_signal_measurement_s32k118

 

Regards,

Daniel

955 次查看
rvalente
Contributor III

Daniel,

I can't see how to chain the FTMs to make a 32 bit timer capture, could you please give me a hint?

0 项奖励
944 次查看
rvalente
Contributor III

Daniel,

how should I chain the FTM0 with FTM1 in K118 to make 32 bit ftm? 

I'm looking to feed a 1MHz clock to FTM1 so it'll overflow every 65ms, I want this overflow to increment FTM1, should I do this externally or can I internally route it?

I believe Its fine to capture the FTM1 bits in software, so it would be set as a single counter only? Can I spare this timer and use another?

0 项奖励