Skip to main content
CH_bot_
Associate II
Sep 14, 2021 2:11 PM UTC
Solved

Debug mode cannot be invoked

Since I flashed the Nucleo-F439ZI board with a firmware, I can neither flash another firmware nor go into debug mode. No error message appears in the console. 

What could this be?

This topic has been closed for replies.
TDK
TDKBest answer
Sep 15, 2021 4:40 AM UTC
You can use STM32CubeProgrammer to erase the flash and/or reset the option bytes.
I feel like you’re missing some output in a console somewhere. Surely there should be a response of some kind from hitting debug.
"If you feel a post has answered your question, please click ""Accept as Solution""."

4 replies

TDK
Sep 14, 2021 2:57 PM UTC

Perhaps you reassigned the SWD pins. Perhaps you are going into low power modes.

> I can neither flash another firmware nor go into debug mode.

Why not? What happens? Show error messages, screenshots, and/or describe the problem you encounter.

"If you feel a post has answered your question, please click ""Accept as Solution""."
CH_bot_
CH_bot_Author
Associate II
Sep 15, 2021 4:37 AM UTC

Thank you for your answer.

Unfortunately, there is no error message in the console.

The debug window does not open and the microcontroller is still configured with the old firmware.

Is there any way to delete the firmware and set the microcontroller to factory state?

Here you can see my console Output after I pressed the debug button:

STMicroelectronics ST-LINK GDB server. Version 5.8.0
Copyright (c) 2020, 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
 
Waiting for debugger connection...
Debugger connected
Debugger connection lost.
Shutting down...

TDK
TDKBest answer
Sep 15, 2021 4:40 AM UTC
You can use STM32CubeProgrammer to erase the flash and/or reset the option bytes.
I feel like you’re missing some output in a console somewhere. Surely there should be a response of some kind from hitting debug.
"If you feel a post has answered your question, please click ""Accept as Solution""."
CH_bot_
CH_bot_Author
Associate II
Sep 15, 2021 6:12 AM UTC

Thank you for the hint with the STM32CubeProgrammer.

After completely erasing the chip, I was able to flash a new firmware and switch to debug mode.

Thank you very much for your quick reply.