Skip to main content
Graduate
February 3, 2025
Solved

Can't connect to the MCU via STLinkV2 [ST-LINK error (DEV_CONNECT_ERR)]

  • February 3, 2025
  • 3 replies
  • 1550 views

I have made a PCB with the STM32C011F6P6 on it and am trying to program it via an ST-LinkV2. While trying it out yesterday, it connected just fine with the cube programmer. Now I am trying to do the same thing again, but both the cube programmer and the cube ide tell me that they can't connect.

DavidL__0-1738596581482.png

I have already upgraded the firmware via "stsw-link004".

Does someone have an idea what might be causing this?

Schematic of my MCU wiring:

DavidL__1-1738596722358.png

 

    This topic has been closed for replies.
    Best answer by DavidL_

    There was an issue with the power supply that causes the errors. Fixed that and it worked just fine.

    3 replies

    Technical Moderator
    February 3, 2025

    Hello @DavidL_ 

    First, stsw-link004 is obsolete. So, please make sure to use the STM32CubeProgrammer last version (V2.18.0).

    Also, could you please share a picture of your ST-Link. It may be a Clone. More details on this article: How to recognize a genuine ST-LINK/V2 versus a clo... - STMicroelectronics Community

    Best Regards.

    STTwo-32

     

    DavidL_Author
    Graduate
    February 3, 2025

    I don't have access to an original one, the one I have access to is this:

    DavidL__1-1738597816299.png

     

    Technical Moderator
    February 3, 2025

    Unfortunately, we can't guarantee anything about a Clone ST-Link. So, I suggest you command a new genuine one if you are looking for good working performance.

    Best Regards.

    STTwo-32

    Super User
    February 3, 2025

    in CubeProgrammer:

    set mode: normal

    + reset: software reset

    -- then try again + show result.

    ++

    put a cap (100nF) on rst to GND !

    DavidL_Author
    Graduate
    February 3, 2025

    DavidL__0-1738597770051.png

     Seems to be the same error.

    Super User
    February 3, 2025

    But still pic shows hw reset:

    AScha3_0-1738598172544.png

    ++

    on CPU: put a cap (100nF) on rst to GND !!!!!!!

    DavidL_AuthorAnswer
    Graduate
    February 4, 2025

    There was an issue with the power supply that causes the errors. Fixed that and it worked just fine.