cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link debugging problem / ST-Link Utility problem

Eetu Piukkula
Associate III
Posted on February 26, 2018 at 18:10

Hi,

I was doing my thing, writting and debugging code with System Workbench and after a while ST-Link refused to work anymore, out of the blue. I had not changed SWD pins nor related settings. It just stopped working. First I thought that I forgot to close previous debug session. But after restarts I was not able to make it work. After many Google searches I found that a lot of people are having trouble with ST-Link from start of the 2 At that time I had updated everything from CubeMX to SWB and Linux resources. Error message changed from wrong ID to general Init() failure. Well, I also had Win10 system. It has not been updated (ST related) since last year. ST-Link Utility gave same error as in this video

https://www.youtube.com/watch?v=LXWi2IR_JrU

. Even when no board is connected to ST-Link. You can see that I asked if person who made the video had solved the issue. He has not.

Basically when ST-Link is plugged, what ever is you first action it works, but second action, for example refreshing device made 'USB Communication error'. I probed serial lines with oscilloscope. When ST-Link is plugged there is traffic, but after that literally nothing will work, line stays pulled high thou. ST-Links light stays always solid red.

Is this a bug or something? Have been 2 days now banging my head to the wall.

--Eetu Piukkula

Note: this post was migrated and contained many threaded conversations, some content may be missing.
11 REPLIES 11
Posted on February 26, 2018 at 18:15

Upgrade the firmware through ST-LINK utility. The video shows 'old firmware'

Posted on February 26, 2018 at 18:18

On both Win10 and Linux side everything is up to date. Symptoms are the same as on the video.

Posted on February 26, 2018 at 18:25

Please check if you have the latest ST-LINK Utility. The ST-LINK you have (seen on the video) is v2, not v2-1?

Posted on February 26, 2018 at 18:37

I have link V2, which is also updated to the newest version. Here are 2 pictures.0690X00000604Q7QAI.jpg0690X00000604QCQAY.jpg

Posted on February 26, 2018 at 18:40

Attach the log  - the messages you see just after starting the ST-LINK utility. You will versions of the firmware there, and ST-LINK HW version (I mean the chines device you connected)

Posted on February 26, 2018 at 19:07

Not sure what you mean. Utility's and ST-Links ID's are there. ST-Link is bough from Digikey and it should be genuine.

On the back of the ST-Link it says 'B 2017 03', 'ST-LINK/V2', Made in China, RoHS text, big ST logo and CE logo.

Are these the logs you meant?

Here is Error

******** xxx ********

******************* GDI DUMP => Date : Mon Feb 26 19:59:48 2018

cErrLog::SetLogTraceOn

STLinkUSBDriver.dll loaded

ST-Link/V2 device detected

ST-Link/V2 device detected

Target voltage detected: 0.000000

Error getting target IDCODE: if SWD, check SWD connection

Error (4) while initializing ST-Link in SWD mode

ST-Link/V2 device detected

Target voltage detected: 0.119764

Error getting target IDCODE: if SWD, check SWD connection

Error (4) while initializing ST-Link in SWD mode

ST-Link/V2 device detected

Target voltage detected: 0.190676

Error getting target IDCODE: if SWD, check SWD connection

Error (4) while initializing ST-Link in SWD mode

ST-Link/V2 device detected

Target voltage detected: 0.234800

Error getting target IDCODE: if SWD, check SWD connection

Error (4) while initializing ST-Link in SWD mode

USB communication error (65567) after target cmd F2 45 00 00 FC 00 00 00 00 00

USB communication error (65657) after target cmd F1 80 00 00 00 00 00 00 00 00

ST-Link get version failure

ST-Link/V2 device detected

ST-Link/V2 device detected

Target voltage detected: 0.000000

Error getting target IDCODE: if SWD, check SWD connection

Error (4) while initializing ST-Link in SWD mode

ST-Link/V2 device detected

Target voltage detected: 0.118188

Error getting target IDCODE: if SWD, check SWD connection

Error (4) while initializing ST-Link in SWD mode

ST-Link/V2 device detected

Target voltage detected: 0.181221

Error getting target IDCODE: if SWD, check SWD connection

Error (4) while initializing ST-Link in SWD mode

ST-Link/V2 device detected

Target voltage detected: 0.220617

Error getting target IDCODE: if SWD, check SWD connection

Error (4) while initializing ST-Link in SWD mode

USB communication error (65567) after target cmd F2 45 00 00 FC 00 00 00 00 00

USB communication error (65657) after target cmd F5 00 00 00 00 00 00 00 00 00

cErrLog::SetLogTraceOn

STLinkUSBDriver.dll loaded

USB communication error (65657) after target cmd F1 80 00 00 00 00 00 00 00 00

ST-Link get version failure

**** End of GDI DUMP ****

Here is Log:

19:59:37 : STLink USB communication error

And here is Trace:

cErrLog::SetLogTraceOn

STLinkUSBDriver.dll loaded

USB communication error (65657) after target cmd F1 80 00 00 00 00 00 00 00 00

ST-Link get version failure

This piece of hardware used to work just perfectly and now all of a sudden it does not.

Posted on February 26, 2018 at 19:17

Yes, I understand your frustration.I have not noticed that it worked fine in the past.

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

I found similar issue which indicates other sources of the problem:

http://www.onarm.com/forum/60989/

 

Maybe it will help you to narrow down the problem.

Posted on February 26, 2018 at 20:08

I have noted that post, it is quite old and I have not made system changes alike since last time ST Utility worked on Windows machine. Also that does not explain Linux issues. (as said I first discovered those issues on Linux machine and moved over to Win10 to rule out Linux drivers/etc. I am running 64-bit Ubuntu 10 with KDE on Macbook). Also the fact that alot of forum posts have been made recently by community about same problems that I first discovered on Linux. Utility problems are just what this whole thing escalated into.

PS. I dont have win10 image and I really really really would not like to re-install windows.

onischenko nikolay
Associate
Posted on March 02, 2018 at 06:52

Hi! I can't connect to st link v2 firmware V2J29S from st link utility (usb communication error) or stmcube32programmer (DEV_NO_DEVICE). What not work? Win7 64 bit.