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.
Hi Douglas,
Sorry for the late reply.
Please try to test the attached project which generated by Processor Expert using KDS3.2.
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!
-----------------------------------------------------------------------------------------------------------------------
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.
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.