2022-03-29 12:43 AM
Hi,
I would use PWM Asymmetric mode to create phase shift between two PWM signals on stm32h7. i didn't find application note for this mode for stm32cubemx, could anyone explain it for me please ?
duty cycle must be the same for the two signals.
Thank
2022-03-29 01:19 AM
The asymmetric mode is described in AN4013 and in more detail in Asymmetric PWM mode subchapter of TIM chapter in RM. Basically, you set up one of the asymmetric modes in TIMx_CCMRx.OCxM (note that for historical reasons it's not a continuous bitfield), and then adjust the two times corresponding to the two edges in both CCRx and its adjacent CCR(x+1)/CCR(x-1), depending on whether x is even or odd.
JW
2022-03-29 01:33 AM
Thank you for your answer,
I setted up the timer it output the two signal, now am trying to shift them with dead time value (0,255) , but it's not sufficient I want to shift between 0 PI ?
2022-03-29 06:16 AM
Don't use dead time, use PWM Mode 2 as JW suggested. This, along with potentially flipping polarity, will give you full control of the duty cycle and delay between signals.
2022-04-14 01:17 AM
Thank you guys 🙂