Switching Port Pins between Alt Function and Normal mode
Hi All,
In a situation where someone might be flashing an LED using a Timer Output (eg Alternate Function Mode connected to a Timer channel output), what if you want to then turn the LED on solid or totally off and then maybe back to the Timer flashing mode, what is the best approach to this?
Would you need to switch the Port pin from Alternate Mode back to a regular output, or can you just disconnect it from the Timer Output, eg Disable Capture/Compare Output enable bit in TIMx_CCER and then just control it directly in the GPIOx_BSRR register.
My understanding is if the Alternate Mode is set for a pin then writing to the GPIOx_BSRR register won't do anything to the output state.
Thanks.
