2018-02-26 09:10 AM
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.2018-02-26 09:15 AM
Upgrade the firmware through ST-LINK utility. The video shows 'old firmware'
2018-02-26 10:18 AM
On both Win10 and Linux side everything is up to date. Symptoms are the same as on the video.
2018-02-26 10:25 AM
Please check if you have the latest ST-LINK Utility. The ST-LINK you have (seen on the video) is v2, not v2-1?
2018-02-26 10:37 AM
I have link V2, which is also updated to the newest version. Here are 2 pictures.
2018-02-26 10:40 AM
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)
2018-02-26 11:07 AM
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 2018cErrLog::SetLogTraceOn
STLinkUSBDriver.dll loadedST-Link/V2 device detectedST-Link/V2 device detectedTarget voltage detected: 0.000000Error getting target IDCODE: if SWD, check SWD connectionError (4) while initializing ST-Link in SWD modeST-Link/V2 device detectedTarget voltage detected: 0.119764Error getting target IDCODE: if SWD, check SWD connectionError (4) while initializing ST-Link in SWD modeST-Link/V2 device detectedTarget voltage detected: 0.190676Error getting target IDCODE: if SWD, check SWD connectionError (4) while initializing ST-Link in SWD modeST-Link/V2 device detectedTarget voltage detected: 0.234800Error getting target IDCODE: if SWD, check SWD connectionError (4) while initializing ST-Link in SWD modeUSB communication error (65567) after target cmd F2 45 00 00 FC 00 00 00 00 00USB communication error (65657) after target cmd F1 80 00 00 00 00 00 00 00 00ST-Link get version failureST-Link/V2 device detectedST-Link/V2 device detectedTarget voltage detected: 0.000000Error getting target IDCODE: if SWD, check SWD connectionError (4) while initializing ST-Link in SWD modeST-Link/V2 device detectedTarget voltage detected: 0.118188Error getting target IDCODE: if SWD, check SWD connectionError (4) while initializing ST-Link in SWD modeST-Link/V2 device detectedTarget voltage detected: 0.181221Error getting target IDCODE: if SWD, check SWD connectionError (4) while initializing ST-Link in SWD modeST-Link/V2 device detectedTarget voltage detected: 0.220617Error getting target IDCODE: if SWD, check SWD connectionError (4) while initializing ST-Link in SWD modeUSB communication error (65567) after target cmd F2 45 00 00 FC 00 00 00 00 00USB communication error (65657) after target cmd F5 00 00 00 00 00 00 00 00 00cErrLog::SetLogTraceOnSTLinkUSBDriver.dll loadedUSB communication error (65657) after target cmd F1 80 00 00 00 00 00 00 00 00ST-Link get version failure**** End of GDI DUMP ****Here is Log:
19:59:37 : STLink USB communication error
And here is Trace:
cErrLog::SetLogTraceOnSTLinkUSBDriver.dll loadedUSB communication error (65657) after target cmd F1 80 00 00 00 00 00 00 00 00ST-Link get version failureThis piece of hardware used to work just perfectly and now all of a sudden it does not.
2018-02-26 11:17 AM
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.
2018-02-26 12:08 PM
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.
2018-03-01 09:52 PM
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.