Skip to main content
KLock.2
Associate II
June 24, 2022
Question

ST-Link/v2 intermittently stops working and must be disconnected and reconnected to USB port. Is there a way to fix this behavior?

We are using STM32_Programmer_CLI.exe in a production environment to load firmware. After a few loads (randomly) the ST-Link/v2 is no longer available to the software. The STM32CubeProgrammer shows "No ST-LINK detected". We must disconnect the ST-Link/V2 from the USB port and reconnect it to continue production.

In desperation, I added this command to our production software so that we will know sooner and waste less time waiting for the error to occur: "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe -c port=swd FREQ=4000"

The error we receive is "1". I could not find a description of this error in the manual.

Is there any command that I can send to the ST-Link/V2 That might prevent this Problem?

Is there any troubleshooting procedure I can use to track down the issue down to fix it?

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
June 25, 2022

Directly connected USB ports, or via hub or docking station?

​

H​ubs frequently give me quirky behaviour with the ST-LINK

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
KLock.2
KLock.2Author
Associate II
June 27, 2022

Both. We had so much trouble with it directly connected (we had to unplug and replug the USB cable so much the connection started getting loose) that we purchased a hub with switches so that all we had to do was turn the port off and then back on (effectively the same as unplugging/replugging).

KLock.2
KLock.2Author
Associate II
June 27, 2022

By the way, we are using a powered USB hub.