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
Lead II

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 someone's post helped resolve your issue, please thank them by clicking "Accept as Solution".
- Please post an update with details once you've solved your issue. Your experience may help others.

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