2021-05-30 07:57 AM
Dear Team,
I want to use the 4 pwms for the phase shifted full bridge application. But I am unable to generate phase shifted pwms. Request to guide how to configure and used the PWMs with phase shifted pwm waveforms from the microcontroller...
2021-05-30 09:24 AM
You can't apply an arbitrary phase shift between channels within the same timer. You can do 180 degrees out of phase, or in-phase.
There are some possibilities with advanced timer features like break time which can sort of phase shift things, but not in an arbitrary manner.
You could use two different timers to do phase shift by starting them from different counter values.
2021-05-30 10:22 AM
Hello TDK,
Thanks for your reply. I also understand the same that with same timer it is not possible to make. Can you please share the example that how can I used other timer creating phase shift between two pwm pulses. This will help me to understand how can be implemented.
Regards,
Dnyanesh
2021-05-30 07:14 PM
I'm not going to write code for it, but one idea would be to have one timer in gated slave mode, and the other master timer driving it, then start them from different CNT values. The CNT value could also be modified on the fly but this makes it harder to synchronize the two exactly.
2021-06-03 05:26 AM
Please can you share the details how can be the PWM timer configuration and additional process logic for phase shift.
Regards,
Dnyanesh
2021-06-03 01:03 PM
Do you need arbitrary phase shift ? Or some specific case ?
You can align one output to "left" and another output to "right". Also you can use "center aligned" PWM to realize some "shifted" PWMs. Next you can generate PWMs by two timer, started with arbitrary phase shift (like TDK wrotes). And with some STMs (STM32F334, STM32H7xx) you can use "high resolution timer" with very flexible outputs. That one can truly realize "phase shifted" PWMs.
2021-06-04 03:16 AM
2021-06-04 03:40 AM
Read the Timer synchronization and Timers and external trigger synchronization subchapters of TIM chapter in RM0008, together with description of TIMx_SMCR (for slave) and TIMx_CR2 (for master) registers.
JW