2018-09-19 05:01 AM
The LL_GPIO_AF_EnableRemap_USART1 in stm32f1xx_ll_gpio (STM32Cube_FW_F1_V1.6.1) gives problems with debugging. Solved by using __HAL_AFIO_REMAP_USART1_ENABLE but when the code is regenerated the fix has to be applied again.
2018-09-19 07:46 AM
Hello @Jvan.9
We cannot reproduce this issue. What are exactly the problem you faced? Have you an error message?
Please share your ioc file if you are using CubeMX or your code file to check this case.
With Regards,
Imen.
2018-09-30 04:06 AM
Hello Imen,
In the attached usart.c file the function MX_USART1_UART_Init calls LL_GPIO_AF_EnableRemap_USART1(). When you step over this function in debug mode the debugger get lost and debugging is not possible anymore. Looking at the differences between LL_GPIO_AF_EnableRemap_USART1() and __HAL_AFIO_REMAP_USART1_ENABLE() the HAL version preserves the SWJ_CFG bits of the AFIO_MAPR register. So looks like the LL version corrupts those bits.
Regards,
John