Skip to main content
Associate II
August 15, 2024
Question

ST-Link always connects on the third attempt

  • August 15, 2024
  • 2 replies
  • 850 views

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

    2 replies

    TDK
    Super User
    August 15, 2024

    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
    August 15, 2024

    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. 

    Douglas MILLER
    ST Employee
    August 16, 2024

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