Skip to main content
Explorer
August 26, 2024
Solved

STM32F407 TIM / PWM Problem

  • August 26, 2024
  • 1 reply
  • 766 views

Hi everyone,

For any timer, counter mode is equal to center aligned mode 3/2/1 except for up or down there are phase sub. between pwm channels with different duty values. There is no phase sub channels with same duty values.

 

For example, in TIM1 with center aligned mode 3, I have selected channel 1 and channel 2 for pwm generation, Arr =100, there is phase sub for

TIM1->CCR1=50 and TIM->1CCR2=75, 

there are no phase sub same values and up/down counter mode.

 

Thank's for valuable comments.

    This topic has been closed for replies.
    Best answer by Sarra.S

    Hello @CKILI.2

    I'm not sure I've understood the issue here.. 

    Since both channels have the same compare value (CCR1 = CCR2 ), the PWM signals for both channels will toggle at the same points in the counting period. Therefore, there will be no phase shift between the two signals.

    The absence of phase shift is due to the synchronized toggling of the two PWM signals, which occurs because the compare match events are aligned. 

    Does that answer your question? otherwise, could you explain more!

     

    1 reply

    Sarra.SAnswer
    ST Employee
    August 28, 2024

    Hello @CKILI.2

    I'm not sure I've understood the issue here.. 

    Since both channels have the same compare value (CCR1 = CCR2 ), the PWM signals for both channels will toggle at the same points in the counting period. Therefore, there will be no phase shift between the two signals.

    The absence of phase shift is due to the synchronized toggling of the two PWM signals, which occurs because the compare match events are aligned. 

    Does that answer your question? otherwise, could you explain more!