cancel
Showing results for 
Search instead for 
Did you mean: 

Debug mode cannot be invoked

CH_bot_
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
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".

View solution in original post

4 REPLIES 4
TDK
Guru

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

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

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_
Associate II

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.