Maximum PWM Frequency K22

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum PWM Frequency K22

298 Views
Contributor II

What is the maximum frequency of the PWM using the FTM0 on a MK22FN128VLL10?

Why I ask is because I can generate a PWM of 10kHz and duty cycle of 50% using the expected numbers for the registers for FTM0.  However, when I try to generate a PWM of 20kHz and duty cycle of 50%, the duty cycle is only 40%.

The frequency is core clock is 96MHz.  Bus clock is 48MHz.

0 Kudos
3 Replies

69 Views
NXP TechSupport
NXP TechSupport

Hi Douglas,

Sorry for the late reply.
Please try to test the attached project which generated by Processor Expert using KDS3.2.

FTM0 PTC1 PWM1_SetRatio16.png

I test the same setting of PWM_LDD on TWR-K22F120M, PTC1 can output the 50% duty PWM.

When Edge-Aligned PWM (EPWM) mode is select, set the CnV half of MOD makes it 50% duty. You can check the value of FTM0_C0V and FTM0_MOD during debug.

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

69 Views
Contributor II

I change my timer and pin to FTM1 and PTA13 and the PWM works correctly on that pin.  FTM0 works alright with C7V and PTD7.  Still wondering why FTM0 and PTC1 are having this issue.

0 Kudos

69 Views
Contributor II

Investigating this some more at the slower speeds.  There seems to be a 5uS delay on switching at the C0V point.  Deadtime is set to 0.

0 Kudos