STM32 Debugging not available
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-14 3: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.
- Labels:
-
STM32CubeMX
-
STM32G0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-14 8: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-14 3:59 AM
Did you try "Connect under reset"? I assume that G0 only remaps NRST after it has booted...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-14 4: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!
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-14 4:09 AM
Thanks I already tried that but still no connection...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-14 4:10 AM
I regret that I should not have tinkered with the NRST during debugging
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-14 4: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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-14 4: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
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-14 5: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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-14 6:07 AM
@watao wrote:I tried connecting to another STM, which was recognized with no problem...
Was that STM running the same code?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-05-14 6:34 AM
No, I tested the connection with CubeProgrammer and ST_LINK Utility, so I did not run the code.
