Is it Possible to use same FTM for PWM and INPUT CAPTURE??

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

Is it Possible to use same FTM for PWM and INPUT CAPTURE??

1,357 次查看
rakeshr
Contributor I

Hello,

I'm using S32K146 board

EXAMPLE:-

I'm generating PWM in FTM1  CH4 of 25khz frequency and i have configured the same FTM1 CH2 for INPUT CAPTURE. and i'm giving the PWM 25khz output to the input capture as an input but output of input capture is shown as 50khz so it is wrong can anyone help about this please.........

Thanks in Advance

Regards 

Rakesh R

标签 (1)
0 项奖励
回复
1 回复

1,160 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

Why do you use FTM1_ch1 to capture the 1th rising edge and FTM1_ch2 to capture the 2nd edge?

You can use Input capture in Dual Edge mode using FTM1_ch0_ch1, for example. This will trigger only one interrupt (FTM1_ch0_ch1) when the second edge is captured and you can read both results at once.

You can refer to

AN5303 Features and Operation Modes of FlexTimer Module on S32K, Section 3.6

AN5303_SW

Regards,

Daniel

0 项奖励
回复