cancel
Showing results for 
Search instead for 
Did you mean: 

St Link v2 connection

Banabender
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

5 REPLIES 5
Karl Yamashita
Principal

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. 

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Andrew Neil
Super User

https://community.st.com/t5/stm32-mcus/how-to-solve-connection-errors-when-connecting-and-programming/tac-p/786977

https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693

 


@Banabender wrote:

but as soon as I try to connect they just vanish. 


Vanish from where - Device Manager? Your (unnamed) programming tool?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

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

 

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.