Skip to main content
Graduate II
August 22, 2024
Question

PWM Generation

  • August 22, 2024
  • 2 replies
  • 573 views

Hello STM Community,

today while generating PWM using Alternate Function Register, I observed that for TIMER 5, Channel 1, I need not configure MOE bit in BDTR register. whereas for TIMER1, Channel 1 I had to configure the MOE bit in BDTR register. Why such deviation? 

thanks and regards. 

    This topic has been closed for replies.

    2 replies

    Super User
    August 22, 2024

    TIM1 is an advanced control timer that requires MOE to be set. It is not the same peripheral as TIM5 and has slightly different operation. The MOE bit being the biggest gotcha.

    TDK_0-1724331437009.png

    TDK_1-1724331457613.png

     

    Super User
    August 22, 2024

    Hi,

    Because timers are Very different, Tim 1 is much more complex.