cancel
Showing results for 
Search instead for 
Did you mean: 

Turning On/Off PWM

bobh
Associate II
Posted on December 06, 2006 at 11:27

Turning On/Off PWM

2 REPLIES 2
bobh
Associate II
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
Associate II
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.