cancel
Showing results for 
Search instead for 
Did you mean: 

''Can not connect to target'' using ST link utility

Ammu govindan
Associate
Posted on March 22, 2017 at 13:22

'Can not connect to target'error message popup appears,when i am trying connect target.I am using St link utility.can some one help me out.

I am using STM32l017K8 Microcontroller.and also i am using SWD interface to program.i had gave following signals.

1.VDD-3.3V

2.SWDIO

3.SWCLK

4.GND

5.NRST

Kindly help me on this issue.

Thanks in advance

5 REPLIES 5
Imen.D
ST Employee
Posted on March 22, 2017 at 14:07

Hello,

I recommend you to upgrade the ST-Link firmware version to V2-1 through this

http://www.st.com/content/st_com/en/products/embedded-software/development-tool-software/stsw-link009.html

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on March 22, 2017 at 14:38

If not the ST-LINK firmware,

Make sure you have the interface pins wired up correctly.

Make sure the part is actually functional, it has power, the analogue supply is connected, and it is not locked in reset.

Make sure the VTref pin of the external ST-LINK is connected to 3.3V, it powers the buffers on the ST-LINK

If it functioned, and then stopped functioning, make sure your code doesn't reconfigure the SWDIO/SWCLK pins. Pull BOOT0 High, or try 'Connect under Reset' options.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on January 22, 2018 at 19:43

Just bricked my BluePill board (STM32F103C8) and was not able to connect to it through the ST-Link:

-I got the message ''cannot connect to the target'' in the log window

-ST-Link was stuck with the status ''Old ST-LINK firmware/ST-LINK already used'' (I have the latest firmware on the st-link device so the message was irrelevant)

0690X00000609PzQAI.png

Nothing helped (connect under reset, low speed, etc), so I re-flashed the board using STMFlashLoader Demo (I pulled the boot0 high to enter DFU mode and start the bootloader - as per your suggestion) and it fixed the issue.

I downloaded the original firmware to the STM32F103C8 (using UART1).

---------------------------------------------------------------------------------------------------------------------

The root cause of the issue (in my case):

I tried to flash the board with the firmware where the SWDIO/SWCLK were disabled. So the solution was about re-flashing the device using bootloader.

Thanks for the suggestion!.

Posted on January 22, 2018 at 20:09

Entering the bootloader should be sufficient to 'not run your code', and it should be accessible via SWD

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on January 22, 2018 at 20:18

Makes sense. I tried this but I failed. Probably for another reason (the ST-link was still unresponsive).