Configuring UART on STM32F103C8T6 (Bluepill) kills connection to ST-Link
When configuring UART on the board, according to https://wiki.st.com/stm32mcu/wiki/Getting_started_with_UART the program can be flashed once. When trying to flash again the system reports:
Target no device found
Error in initializing ST-LINK device.
Reason: No device found on target.
This happens even when just the configuration is set, no data transmitted and MS_USART_UARTx_Init() is commented out. The error occurs with every UART. It does not disappear when deleting the UART configuration in the IOC editor and regenerate the code without any references to UART. With BOOT0 set to high, reconnecting to ST-Link and flashing another program without configured UART the board behaves normally again. Commenting out HAL_Init() prevents this error, but I strongly assume that leads to other problems. This only happens to the Bluepill board, testing the same configuration with an STM32F407VGT6 (STM32F4-Discovery and an STM32F401CEU6 (Blackpill) stay inconspicuously.
Any ideas how to circumvent this behavior?
