2020-04-12 06:01 AM
I have been working for days with the ST-link v2 and the Steval FCU001V1 in Ubuntu 18.04.
I have generated the code for the most important utilities to read, for example, the sensors, set the LEDs and send data over the USB.
I have compiled the code using makefile and I flashed the code on the Steval through the st-flash command from the terminal.
Everything was working well until the stlink suddenly stopped to work. I can't even say whether this happened after a change of the Steval's main firmaware or not.
The point is that the STLink is now no more recognized, at all, from 3 different operating systems: Mac, Windows 10 (VMWare) and Ubuntu 18.04 on two different computers.
The Steval is still running and I can see IMU data from the usb.
Furthermore, the st-link "com" led is stuck on ORANGE.
I tried all the possible ST software out there but no one is able to see the STLink-V2.
It's also impossible to update the STLink-V2's firmware because the answer is always the same: st-link is not found!
In particular, if I try to flash the code through the STM32CubeIde, the error I get is:
Error in final launch sequence:
Error in initializing ST-LINK device
Reason: (2) ST-LINK DLL error
PS. The Stlink does not appear in the list of the usb peripherals in any of the OS I cited. On Ubuntu, instead, before this problem, the St-link was easily found in the /dev/ folder and also in the lsusb list.
I also uninstalled in installed again the drivers on the Windows VM as well as in Ubuntu. Nothing changed!
PPS. When this problem arose, I was not playing with the hardware.
Thanks in advance for any help!
2020-04-12 06:48 AM
On linux, run "dmesg -w" while uou un- and replug the stlink. If there is any reaction, post here. Otherwise, try another cable and another USB plug on your computer.
2020-04-12 07:12 AM
Thank you very much for the prompt reply.
Yes, there has been a reaction. In the picture you can see what happened when I replugged the the hardware.
2020-04-12 08:30 AM
Stlinkv2 has a fixed pull-up on USB-DP, causing the system to try to reenumerate. The Stlink does not react on the reenumeration requests. Just to be sure: The target board is disconnected? Is yes, I think your STLink is defunct. Did you perhaps wrong wire something and external volatage > 3 Volt or < -1 Volt got applied to the Stlink? This is the only way I killed STM32s. If the target board is still connected, retry with the target board disconnected
2020-04-12 08:46 AM
Yes, the target board is disconnected. I wrong wired the Steval on the STlink some days ago... I did not realize that the plug didn't match properly the pins. But I have immediately fixed it and after that it kept working. I would also expect to burn the Steval with this error, not the Stlink. But probably I'm wrong and I'm also surprised that if this is the problem the hardware worked for several days without any problem.
2020-04-12 08:48 AM
Anyway, thank you very much for the help. I was already pretty much convinced to buy a new one. Now I probably have the confirmation that it's the only way.
2020-04-19 05:07 AM
Update: I bought a new STLink-V2, it started working properly and now, on the new one, I have the same problem as before. How is this possible?
The only thing that I have done differently from the usual has been to flash on the board a .bin generated from the Cube IDE in Windows.
2021-09-02 04:18 AM
same problem. worked OK until I used stm32cubeProgrammer to flash a bin file. I think I need to buy a new one and Ban stm32cubeProgrammer.
2021-09-02 04:26 AM
I suggest you to plug in and plug off the STLink until the light becomes red again. It can take a while, it's brute force, I don't know why this method works, but each time it happens I used it and everything goes ok. I did it many times