Skip to main content
bobh
Associate
December 6, 2006
Question

Turning On/Off PWM

  • December 6, 2006
  • 2 replies
  • 682 views
Posted on December 06, 2006 at 11:27

Turning On/Off PWM

This topic has been closed for replies.

2 replies

bobh
bobhAuthor
Associate
May 17, 2011
Posted on May 17, 2011 at 09:34

I have Timer2 running in PWM mode at 8Khz. I need to turn it on and off to run a buzzer. This works, but only once. I am setting and clearing bit 2^15 in the TIM2_CR1 register during an interrupt on Timer3.

Any suggestions?

bobh
bobhAuthor
Associate
May 17, 2011
Posted on May 17, 2011 at 09:34

My bad. I called GPIO_DeInit to set up other bits in the port that held the PWM bit. DeInit resets all port bit definitions.