Skip to main content
Lchal.1
Associate III
August 27, 2020
Solved

hello, i need to set my counter mode as edge align or center align mode in my PWM . But do i need to add any line of code in my program or just i can set in my counter mode settings. can anyone let me help what i need to add in my code so that i ge

  • August 27, 2020
  • 2 replies
  • 695 views

my PWM wave as center align mode.

Thank you

This topic has been closed for replies.
Best answer by TDK

Counting mode is controlled by the TIMx_CR1_CMS bits. Timer must be disabled before you can change them.

If you're using CubeMX, it'll generate the initialization code for you. Or you can change them yourself.

2 replies

TDK
TDKBest answer
August 27, 2020

Counting mode is controlled by the TIMx_CR1_CMS bits. Timer must be disabled before you can change them.

If you're using CubeMX, it'll generate the initialization code for you. Or you can change them yourself.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Lchal.1
Lchal.1Author
Associate III
August 28, 2020

Thank you