cancel
Showing results for 
Search instead for 
Did you mean: 

Stopping a Buzzer driven by Timer 16, STM32G071

danielbath
Visitor

Hi All, 

 

I want to do something very basic, but somehow cannot manage to do it. 
What happens if you have a PWM signal on an IO Pin, generated by a timer, and you disable the timer? 

What happens to the physical IO Pin ? Is it stuck at the state where it was when you disabled it ?, Does it go Low ? Or High. The Idle state of the Timer is Low, and the On state High. 

 

Thanks, 

DJ 

1 REPLY 1
waclawek.jan
Super User

> and you disable the timer?

Define "disable the timer".

If it's clearing TIMx_CR1.CEN, it stops the counter and the related TIMx_CHx pin remains in that state in which it was at that moment.

But you can for example also clear the respective TIMx_CCER.CCxE bit, and that would set the given pin to Hi-Z.

JW