0
\$\begingroup\$

I have some strange behaviour of my STLINK V2 when I just plug it in the USB port and then open the STLINK Utility tool. When I then go to settings it finds the STLINK V2, but after about 5s the program seems to hang and the serial number disappears and it says "Old ST-LINK firmware / ST-LINK already used"

I use windows 10 and the most recent drivers for the STLink and the windows 10 drivers (STSW-LINK009). The STLink is just plugged in and the SWD interface is not connected to any device.

Has anyone an idea why this error occurs and how to fix it?

enter image description here enter image description here

\$\endgroup\$
  • \$\begingroup\$ (a) Has this "STLINK V2" ever worked? (b) Is this a genuine "STLINK V2"? A photo would help. (c) I haven't seen the behaviour you describe, but I have found the log files to be useful with other STLINK-related problems. Have you looked for a log file (as "ticked" in that screenshot) and, if found, can you add the relevant part to your question? (d) The screenshot shows "USB Communication Error". What USB-related troubleshooting/substitution (port, cable etc.) have you done, with what results? (e) Do you have a target board attached via SWD/JTAG to this STLINK, during this testing? \$\endgroup\$ – SamGibson Mar 6 '18 at 20:26
  • \$\begingroup\$ a.) Yes, this STLINK V2 worked just fine some time ago. b.) It's a normal STLINK V2, depicted above. c.) The new built LOG files are empty when I connect the STLINK V2 and the error above occurs. d.) I changed all the ports and the cable aswell, but it did not change anything. e.) There is no targert board connected during this testing. \$\endgroup\$ – HansPeterLoft Mar 7 '18 at 7:54
  • 1
    \$\begingroup\$ They are quite sensitive STM programmers. If you leave the un-energized (i.e. USB cable is unplugged) programmer connected to the target circuit/system (from that tiny 4-pin Molex connector) while the target is energized then the programmer gets broken down (The reason is that the programming pins are directly connects to the ST-Link's internal MCU without any protection). This may be the cause of your problem. I've used them for a long time then I switched to Raisonance RLink, by the way (Yes, they're quite expensive). \$\endgroup\$ – Rohat Kılıç Mar 7 '18 at 9:04
  • \$\begingroup\$ @HansPeterLoft - Thanks for those answers; they has eliminated some possibilities. From answer (a) since it has worked in the past then something has changed. Your mission ("should you choose to accept it" ;-) ) is to remember when it last did work, when it first did not work, and list all the h/w & s/w changes between those two dates. The only thing which you won't know to put on the list, are unknown changes e.g. h/w damaged as mentioned by Rohat. || Obviously if you can try that STLINK V2 on another PC and it works, that means the problem (could be h/w or s/w) is with the PC. \$\endgroup\$ – SamGibson Mar 8 '18 at 2:21
  • \$\begingroup\$ I'm voting to close this question as off-topic because it has been abandoned for over a year and has only attracted irrelevant responses \$\endgroup\$ – Chris Stratton May 10 at 2:12
0
\$\begingroup\$

Had a very similar issue with an ST-link that connected to the target device intermittently and then not at all. Ended up being a failed 22R resistor withing the ST-LINK/V2 that goes to the header. I Did a track cut to bypass the faulty resistor part (as it is a multi resistor device) and linked in a new through hole 22R resistor and all is good again. The mentioned resistor RS1 links directly to SWDIO (pin 7) on the header and is just one resistor within the multiple resistor SMT device. You can cut the track linking the resistor RS1 to U7 and the apply the new resistor directly between U7 and the Header. For reference: The resistor in question and the required pin on U7 also links to pin 19 on the IC U2 Anyway the resistor might be worth checking if you have exhausted other options... worked for me, may have been an isolation issue.

\$\endgroup\$
  • \$\begingroup\$ This would not be the issue for the asker, who describes a problem that occurs even with no target connected. \$\endgroup\$ – Chris Stratton Nov 30 '18 at 20:26
0
\$\begingroup\$

I ran into this issue when playing with the ST-link a month or two ago, and I can tell you I felt the same pain. As I recall, the cause of my particular problem was related issues with the boot pin(s) and/or powering the device. I don't have any info about your target device but my target device(s) (STM32F305, STM32F103 "blue pill", etc) were affecting the ST-link. Whether this is the problem in your case, or not, you should do the following things:

1) Make sure you have the latest drivers for the ST-link installed on your computer 2) Make sure your target device has separate power (don't rely on the ST-link itself to provide power all on its own to your uC circuit) 3) Check the state of the Boot pins on your target device (Boot0 and Boot1). Pulling them in different combinations of high/low will force the device into different modes, which can (will) affect communication with the ST-link. 4) Some devices don't have pull-up/down resistors on certain Boot pins (or Reset pin), which can cause issues related to the point above.

\$\endgroup\$
  • \$\begingroup\$ No, you ran into an entirely different issue. This has nothing to do with the question that was asked, which is about a problem that occurs even with no target connected. \$\endgroup\$ – Chris Stratton Nov 30 '18 at 20:27
  • \$\begingroup\$ Hi Chris, thanks for your input. I was actually responding to the question by implying that the device should be connected to the target for it to work. I can only speak from my own experience on the matter, which is that I was receiving the same error (and resulting screentshot message) until I properly connected my ST-link to the target device - once properly connected, the error was no longer present. I appreciate your vigilance on the matter. I'd suggest posting an answer if you are able. \$\endgroup\$ – 343GuiltySpark Dec 3 '18 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.