Get HardFault when debug a stm32f103 mcu when remapping timer channel with HAL lib
In order to get PWM output to PB5, I configurated the Channel2 of TIM3 to be "PWM Generattion CH2" and the PB5 pin to "TIM3_CH2". Then, the code generated and imported into STM32CubeIDE, the pointer stopped at "void HardFault_Handler(void)" function in "stm32fxxx_it.c" file. I found there are several tips reported the similar problem, but however, none of the sulutions such as comment "__HAL_AFIO_REMAP_TIM3_PARTIAL()" function and write the "AFIO_MAPR" register directly works for me. There are no differences between using ST-LINK JTAG and SWD -- both of which raises the same error.
I'm using STM32Cube FW_F1 V.18.4 with ST-Link/V2.
