cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Debugging not available

watao
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.

12 REPLIES 12
Uwe Bonnes
Principal III

Did you try "Connect under reset"? I assume that G0 only remaps NRST after it has booted...

Andrew Neil
Evangelist III

@watao wrote:

Please share your wisdom on how to connect and debug.


FWIW, my wisdom says that repurposing NRST is highly un-wise!

Thanks I already tried that but still no connection...

I regret that I should not have tinkered with the NRST during debugging

Uwe Bonnes
Principal III

Sorry, Connect under reset will not work with NRST remapped without reboot. Can you unpower the board, pull NRST low, repower and than connect under reset and remove the NRST pull?

An older & wiser engineer once said to me:

"if you don't have enough resources to dedicate 10% to debug/diagnostics,
then you don't have enough resources"

in that context, "resources" includes pins.

 

#DebugResources #Diagnostics

I tried but still could not connect.
I have a Nucleo ST-Link, so I tried connecting to another STM, which was recognized with no problem...

 


@watao wrote:

 I tried connecting to another STM, which was recognized with no problem...


Was that STM running the same code?

No, I tested the connection with CubeProgrammer and ST_LINK Utility, so I did not run the code.