SWO ITM printf() output using ST-LINK utility while debugging
I don’t see you did anything wrong, but I can understand the result that you get.
The problem is that the driver of ST-LINK v2 does not designed for sharing by application
simultaneously. While you start debugging, the debugger app acquired the driver of ST-LINK v2 and the
app of ST utility can’t get the driver any more, and vice versa.