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.

1 ACCEPTED SOLUTION

Accepted Solutions
Uwe Bonnes
Principal III

Have a look at https://community.st.com/t5/stm32-mcus-products/need-a-clarification-on-nrst-mode-functionality/td-p/249891 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.

View solution in original post

13 REPLIES 13
Uwe Bonnes
Principal III

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


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