cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 DOESN'T WORK AFTER EXITING DEBUG MODE

AlexanderKibarov
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Sarra.S
ST Employee

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

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.

View solution in original post

4 REPLIES 4
Sarra.S
ST Employee

Hello @AlexanderKibarov

Are you entering some low power mode? 

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.

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.S
ST Employee

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

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.

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.