cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link always connects on the third attempt

OlegAjax
Associate II

When starts debug my project in CubeIDE Version: 1.16.0 Build: 21983_20240628_1741 (UTC)

 there is always connect from third attempt. Because why and how can I fix it to connect from first attempt?

OlegAjax_0-1723714592179.png

 

Thank you

3 REPLIES 3
TDK
Guru

This is the expected behavior. During the downloading process, the chip resets twice. When it does, debugger connection is lost and must be reestablished.

If you feel a post has answered your question, please click "Accept as Solution".
BarryWhit
Senior III

One of those reconnections is due to "Live expressions" being enabled in the "debug" tab of the run configuration.

What TDK says makes sense, only that even if you disable live expressions (they require a debugger connection) and use "Run..." instead of "Debug..." you still get two connections, when only one would be required to download the program. And anyway, these debugger connections aren't used for downloading, since that's done by separately invoking the Cube32Programmer CLI. 

 

See my old threads:

Why is STM32CubeIDE so much slower than STM32CubeProgrammer for programming chips?

HOWTO: Download programs 30x faster to STM32 from STM32CubeIDE

for a summary of what I found when I looked into this issue a few months ago. 

- If a post has answered your question, please acknowledge the help you received by clicking "Accept as Solution".
- Once you've solved your issue, please consider posting a summary of any additional details you've learned. Your new knowledge may help others in the future.

This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.