cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Can not connect to target! In STM32 ST-Link Utility

cdmech
Associate II

Hello STM enthusiasts,

I am reaching out as I am having a puzzling issue with connecting to my STM32 chip with an ST-LINK V2.

What I have for a set up is:

OS: Windows 10 x64 bit

IDE: Atollic TrueStudio v9.1.0

Debugger/Programmer: ST-LINK V2

Chip: STM32F030R8T6 (ARM core M0)

My chip is soldered onto a breakout board, which I got from NewbieHack.com. Nothing else is on the board, just the chip and easy access to the pins.

I am trying to run a simple test program to blink an LED, but I am running into the “Can not Connect to Target Error�?.

This error comes up in TrueStudio and the STM32 ST-LINK Utility.

Pictures from the error in both environments are attached.

I have checked the physical cabling as well as the ST-Link dongle. Both seem fine. The ST-Link LED lights up. It blinks blue when it tries to connect and turns orange when it fails to connect. Connections are made to the correct pins from the dongle to the chip: SWCLK, SWDIO, 3.3v and GND. I can also confirm that power is getting to the chip.

In the STM32 ST-LINK Utility I have tried to update the firmware (picture attached), which seemed to update alright, but did not solve the issue. The error message in STM32 ST-LINK Utility (picture attached) suggests trying different configuration of settings under the target menu. I have tried many different configurations, but with no success (picture of settings window attached).

The chip may be bricked, so I have tried to do the following:

-Set BOOT0 high and get the device to boot into System Loader mode and erase it. This still gave me the cannot connect to target error.

-Full chip erase in STM32 ST-LINK Utility with reset output set (high and low). Again, the same error.

One thing I am worried about is about the ST Link under Windows device manager (picture attached). Messages appear such as: “device install requested�? “device not migrated�? and “device requires further installation�?.

I have installed, uninstalled and re-installed the newest drivers: STSW-LINK009. When I read the data brief on this it says: “The driver must be installed prior to connecting the device, in order to have a successful enumeration.�? The first time I installed, the device (ST link dongle), was definitely connected. So, I uninstalled and re-installed with the device disconnected before connecting again.

Unfortunately, all of my troubleshooting attempts have been in vain and I am at a loss now. If there is in fact a driver installation issue as the device manager suggests, then unfortunately I have run out of ideas to fix it. If it is something else causing the issue, then again, I cannot figure it out… If anyone can shed some light on this, I would really appreciate it!

Thank you!

6 REPLIES 6
SBIsh.1
Associate II
  1. Did you figure it out? Because i am facing the same issue right now.

pls help if you know the solution.

Describe your situation in more specific detail, don't #MeToo 4 year old zombie threads.​

Use STM32 Cube Programmer, the Utilities have been deprecated for years.

Check AV software isn't blocking USB MSC.

Check cables.

Target connection is different to no drivers.

Check power and connections to board.

ST-LINK wants to see target power on pin 1, it doesn't supply it.

For CM0 pick lower connection speeds.​

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

I have done the same connections on my custom board as i did on my blue pill.

but for some reason blue pill works in one go where as the custom board(stm32f103vct6) fails to connect.

i am using st link v2

swdio-dio on chip

swclk-clk on chip

vdd from pin1 stlink powering up the boards

connections seem to be working perfect for blue pill but not with my board.

SBIsh.1
Associate II

i have tried to pull up boot0 and boot 1 to ground to flash the controller.

again the blue pill works fine but custom board doesn't connect.

is there anything else i have to keep in mind while designing the board which is present on blue pill but not on my board.

The MCU has to be viable. A lot of people doing custom boards get things wrong.

Make sure you have the analogue supplies connected.

Check pin assignments, and orientation of the part.

Check power pins

Check voltage level of NRST pin

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

>>vdd from pin1 stlink powering up the boards

Pin 1 is not a source of power (20-pin ARM JTAG Header)

Are you using an official ST-LINK/V2 or a fake/clone one

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