Skip to main content
AlexanderKibarov
Associate III
August 28, 2024
Solved

STM32 DOESN'T WORK AFTER EXITING DEBUG MODE

  • August 28, 2024
  • 2 replies
  • 1628 views

Hello,

I’m not sure that is this important, but the board I’m using is the STM32F413ZH. When I try running an application on the STM32, it generally works fine, but sometimes after exiting debug mode, it stops working. Actually, this isn't a big problem for me because pressing the reset button fixes it. However, I’m curious—what could be causing this issue?

 

For example, I turn an LED on and off. If I do not turn it on to debug mode, there is no problem. Or when I turn it on, there is no problem, but if I turn the debug on and off, the LED remains as it is.

Thanks.

Best answer by Sarra.S

If the GPIOs used for debugging are reconfigured during the application execution, it can cause the debug connection to be lost. For example, configuring all GPIOs to analog input mode to reduce power consumption can affect the SWD GPIOs

2 replies

ST Employee
August 28, 2024

Hello @AlexanderKibarov

Are you entering some low power mode? 

AlexanderKibarov
Associate III
August 28, 2024

Hello, @Sarra.S 

Probably you mean this in my opinion.

Ekran görüntüsü 2024-08-28 165937.png

However, answer is no because low pow mode is disable in debug.

Sarra.SBest answer
ST Employee
August 28, 2024

If the GPIOs used for debugging are reconfigured during the application execution, it can cause the debug connection to be lost. For example, configuring all GPIOs to analog input mode to reduce power consumption can affect the SWD GPIOs

mƎALLEm
Technical Moderator
August 28, 2024

Hello @AlexanderKibarov ,

 

@Sarra.S wrote:

If the GPIOs used for debugging are reconfigured during the application execution, it can cause the debug connection to be lost. For example, configuring all GPIOs to analog input mode to reduce power consumption can affect the SWD GPIOs


Here we talk about PA13 (SWCLK) and PA14 (SWDIO).

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