2016-10-04 12:21 PM
Hello,
I'd like to know how to enable or disable freely for TIM3 clock output after initialization.
Once clock output is enabled, I cannot disable the clock ouput.
Device: STM32F207ZG
Thanks.
#timer-clock-enable-disable2016-10-04 01:14 PM
Assuming you output PWM through one of the timer's compare channel and you want to tristate the related pin, you have several options:
- change the pin's mode from AF to Input, in GPIO - disable output compare through respective TIMx_CCER.CCyE (this is probably what you really want) - change the given channel's mode from Compare to Capture, TIMx_CCMRz.CCyS = 0b01 (changing this requires to switch the channel off using CCyE anyway, so this is not really an option) JW2016-10-07 07:27 AM
Thank you very much for your relpy!
I solved it thanks to your help.