STM32: F1 GPIO: Enable AFIO clock
It is required to enable AFIO clock before using __HAL_AFIO_REMAP_xy macros, which was missing here. Without clocks enable, the remap actually doesn't occur. This would possibly cause some PIOs (part of PB_3, PB_4, PA_13, PA_14, PA_15) to not behave as expected. In most cases AFIO clock was enabled in stm_pin_SetAFPin function, so that this bug was not visible. But there were few cases left were stm_pin_DisconnectDebug would be called first. A typical case was with GCC_ARM in case a DigitalInOut variable is declared as global. |
---|
|
targets/TARGET_STM/TARGET_STM32F1/pin_device.h |
---|