Showing results for 
Search instead for 
Did you mean: 

STM32 Debugging not available

Associate II

I am using STM32G031J6M6 and using NRST pin as GPIO.

I have been unable to connect to STM32CubeIDE, CubeProgrammer and ST-Link Utility since then, probably because I executed __WFI() in the program.

CubeProgrammer error code

STM32 target not found! If your product has debug authentication built in, please use debug authentication to run detection.”

I did a lot of research and could not connect to either Software/HardwareReset.

Please share your wisdom on how to connect and debug.


If the problem is due to your code reconfiguring the debug pins (or whatever), you would expect not to see it on a chip not running that code!


Need to make sure you provide a back-door method(s) of erasing the chip and/or option bytes when putting code on devices during initial bring-up experiments. Having an interactive monitor so you can run tests after it's booted can also provide means of escape and recovery.

The alternative is to remove/replace devices you brick, decide which is more difficult/tedious

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Uwe Bonnes
Principal III

Have a look at too

Upon power reset or wakeup from shutdown mode, the NRST pin is configured as Reset input/output and driven low by the system until it is reconfigured to the expected mode when the option bytes are loaded, in the fourth clock cycle after the end of trstempo.