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.
ls
1 parent 7653f65 commit d4fa585ac479f1f23250d2dd65dcfd30e5b7520e
@Laurent MEUNIER Laurent MEUNIER authored on 21 Aug 2017
Showing 1 changed file
View
targets/TARGET_STM/TARGET_STM32F1/pin_device.h