Skip to main content
Explorer
April 28, 2025
Solved

St Link v2 connection

  • April 28, 2025
  • 3 replies
  • 1494 views

I´ve bought a new ST-Link V2 from a reputable electronics Vendor (Reichelt, Germany) to connect to my Cartographer 3d scanner for a 3d Printer with an stm STM32 chip. It is connected correctly as far as I know. I cannot establish any connection. I've also tried another board that didn't get recognized, so I think my ST-Link is broken, or am I overlooking something here? They both sometimes show as SN: 31FF710631315436290343, but as soon as I try to connect they just vanish. Is the ST-Link broken, or am I missing something since this is my first time doing this?

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    Pin 1 of the ST-LINK 20-pin header needs to be 3.3V or the Voltage of the Target, it's an input to the ST-LINK to power the interface to your board.

    You really shouldn't be powering the board from the ST-LINK (Pin 19?)

    You need a common ground, but the 3V3 from the board should be going to Pin 1 of the ST-LINK

    Other connections SWDIO, SWCLK, NRESET

    3 replies

    Graduate II
    April 28, 2025

    Try another USB cable and/or another USB port. Are either boards powered up while you're trying to connect the ST-Link? Are you using STM32CubeProgrammer? Are there no error messages of some sort?

    Show the a diagram on how you've connected the ST-Link to the 3D scanner board and it's pinouts. 

    Explorer
    April 30, 2025

    I have tried all my USB ports in my Laptop, used a different Laptop, and tried 3 known working cables, both boards are powered while attempting to connect. I have now found a mistake in my wiring and have changed that. I don't have a pinout of the scanner unfortunately but I have connected like the manufacturer wants me to connect.

    ST-Link    Scanner 

    SWDIO    SWD

    SWCLK   SCL 

    VAPP       5V    and my power supply

    GND        GND    and power supply ground

    I am using STM32CubeProgrammer and I get this from the log

     

    13:21:54 : Start STLinkUpgrade...
    13:22:23 : UR connection mode is defined with the HWrst reset mode
    13:22:28 : ST-LINK error (DEV_USB_COMM_ERR)
    13:22:28 : Error: Problem occurred while trying to connect

    as well as a popup, but I can see the ST-Link in the Task Manager the whole time.Screenshot (15).png

     

    Graduate II
    April 28, 2025

    Pin 1 of the ST-LINK 20-pin header needs to be 3.3V or the Voltage of the Target, it's an input to the ST-LINK to power the interface to your board.

    You really shouldn't be powering the board from the ST-LINK (Pin 19?)

    You need a common ground, but the 3V3 from the board should be going to Pin 1 of the ST-LINK

    Other connections SWDIO, SWCLK, NRESET

    Explorer
    April 30, 2025

    Thanks, that was the issue as well as I didn't think there was a read-write lock on the board that I'd have to clear before connecting, but now it works.

    Super User
    April 29, 2025