cancel
Showing results for 
Search instead for 
Did you mean: 

Is it normal to have to manually press the reset button on the development boards to connect to the development boards?

jhin
Associate II

Hi! I am grad student that is a newcomer to the STM32 MCU platform. I want to ask a question about the problems I have been experiencing with my development boards. Is it normal to have to manually press the reset button on the development boards to connect to the development boards?

I have two boards, NUCLEO-H723ZG and NUCLEO-F411RE. When I try to connect to a board using STM32CubeProgrammer, it will write an error message "Error: No STM32 target found!" unless I manually press down the RESET button and release it with appropriate timing.

0693W00000KaCn7QAF.png0693W00000KaCnMQAV.pngAnd if I manually press the reset button and release it with the right timing:0693W00000KaCoFQAV.pngAnyone can tell me what is wrong?

5 REPLIES 5
Peter BENSCH
ST Employee

Welcome, @jhin​, to the community!

No, this is only normal if there is already a program on the STM32 that may be using ultra-low power modes or has been programmed without SWD pin assignment. However, if you set the Reset Mode of the CubeProgrammer from software to hardware reset, you should have immediate access.

Regards

/Peter

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

Hi @Peter BENSCH​ and thank you for the warm welcome.

You are right, when I select the hardware reset it successfully connects in STM32CubeProgrammer. This is good to know!

Using that as a jumping-off point, I am experiencing the same issues in my dev-env (VS Code + platformIO) with the inability to reset during flashing. Here there are no drop-down parameters like in STM32CubeProgrammer. Perhaps there is a more global solution to be found?

The SWD pin assignment, where do I check that? Is there perhaps a jumper on the development board that is misconfigured?

Typically you can always connect to the STM32 with Connect under Reset (of course only if it is not locked), so you can consider this as a global solution. In addition to the STM32CubeIDE, there are also non-free IDEs (e.g. Keil, IAR) whose debugger also supports this.

How to set up the SWD pins depends on your software environment. Typically, you can do the basic configuration of the STM32 with STM32CubeMX or right away in the STM32CubeIDE (in addition to the STM32CubeMX mentioned, it also contains the GNU GCC compiler and a debugger). There, in the SYS peripheral, only a tick has to be set for Debug Serial Wire, which sets the pins provided for this to the mode Serial_Wire and their function to SYS_SWCLK and SYS_SWDIO.

You can find out what that looks like in your environment with PIO in their forum, e.g. here.

Good luck!

If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.

/Peter

In order 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.
jhin
Associate II

I have not been able to resolve the problem yet. I tried switching my upload protocol to mbed (instead of default stlink/openocd) in platformIO and it successfully uploads.

Is it possible the mbed interface is interfering with the stlink protocol? It opens up the mbed disk on my machine every time it is plugged in, so it must be communicating with the board.

> The SWD pin assignment, where do I check that?

In their respective GPIO registers.

Peter mentioned also the other possible reason, so, do you use low-power modes in your program?

JW