cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4 chip: Unable to Connect, but It Still Runs with the Latest Code

CCND
Associate

 

Hello everyone,

I'm encountering a perplexing issue with the STM32G4 chip and could really use some insights from the community.

After successfully programming the chip, everything seemed to be functioning smoothly. The code was running as expected, with all functionalities intact. However, subsequent attempts to reprogram or establish a connection with the chip have failed. Whenever I try to load code using either the IDE or Utility, I consistently receive the error message:

STMicroelectronics ST-LINK GDB server. Version 7.3.0
Copyright (c) 2023, STMicroelectronics. All rights reserved.

Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled

Target no device found

Error in initializing ST-LINK device.
Reason: No device found on target.

This has left me puzzled, as the chip seems to be running the previously loaded code without any issues, yet it's inaccessible for further programming or debugging.

Has anyone encountered a similar problem with the STM32G4 chip before? Any suggestions or insights on how to troubleshoot and resolve this issue would be greatly appreciated.

Thank you in advance for your help!

3 REPLIES 3
SofLit
ST Employee

Hello,

Did you enable RDP feature in option bytes (in your code maybe)?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Make sure you're not muddling with the GPIOA clock or settings, or disturbing the PA13/PA14 pins used for debugging.

Low power modes will also interfere

As for "Utilities" the G4 isn't supported by ST-LINK Utilities, and needs to use STM32 Cube Programmer.

Connect Under Reset only works if NRST is "connected"

Pulling BOOT0 HIGH will removed errant user code from the equation.

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

No, I haven't done anything relating to that. I wonder if there was any situation that I got in level 1 or 2 although I do not anable RDP?