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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

970 Views
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

Labels (1)
0 Kudos
Reply
1 Reply

773 Views
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 Kudos
Reply