Hi Cluadio brunelli,
Thank you for your image!
The zero crossing wave is for FTM0_CH5(PTD5) rising capture edge? When capture the rising edge, you will output the PWM wave in PTC1-3, but you find the output PWM wave the rising edge have the time delay with the zero crossing wave? What the delay phase you are meeting now? and what the smallest range you are wanting?
Because after capture the zero crossing, then output the PWM, it must have some time delay, what we do now is just shorten the phase delay time to the smallest.
I suggest you configure the FTM clock as the fastest clock, and use the capture interrupt to enable the PWM output, this will minimize the delay time.
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------