2024-05-14 03:48 AM
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.
Solved! Go to Solution.
2024-05-14 08:26 AM
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.
2024-05-14 03:59 AM
Did you try "Connect under reset"? I assume that G0 only remaps NRST after it has booted...
2024-05-14 04:03 AM
@watao wrote:Please share your wisdom on how to connect and debug.
FWIW, my wisdom says that repurposing NRST is highly un-wise!
2024-05-14 04:09 AM
Thanks I already tried that but still no connection...
2024-05-14 04:10 AM
I regret that I should not have tinkered with the NRST during debugging
2024-05-14 04:36 AM
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?
2024-05-14 04:42 AM
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
2024-05-14 05:36 AM
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...
2024-05-14 06:07 AM
@watao wrote:I tried connecting to another STM, which was recognized with no problem...
Was that STM running the same code?
2024-05-14 06:34 AM
No, I tested the connection with CubeProgrammer and ST_LINK Utility, so I did not run the code.