What exactly does STLink/v2 do on connection to an MCU?
I am currently porting klipper (https://github.com/KevinOConnor/klipper) to stm32f070. It's not a terribly heavy lift considering stm32f042 is currently supported. It currently works great, but only with the stlink connected. If I unplug the STLink, it stops working, reattach, and it starts working again.
Specifically, it's only UART communication that fails. I have set up some debug LED to check that all the proper places in the code are being reached without the stlink attached, and they are.
Is there any documentation on what the STLink adapter does when it connects to the MCU? Does it set the clocks? Disable faults? Turn off the watchdog? Configure anything? I only have a four pin connection (GND, 3v3, SWDIO, SWCLK) from the stlink to the mcu, so I'm not using any extra features, just the basic connection.
I haven't ever encountered a situation before where merely attaching a debug device remedies my problem, it makes for a real head-scratcher.
Thanks!
