2025-12-08 2:50 AM - edited 2025-12-08 2:52 AM
Hi!
I'm having trouble connecting to an STLINK ISOL via STM32CubeProgrammer. The STLINK is authentic, I purchased it from digikey.
The programmer is detected under Device Manager. The programmer's LED remains static red at all times.
Sometimes STM32CubeProgrammer detects an STLINK device, but when I click connect it gives
10:40:01 : STM32CubeProgrammer API v2.21.0 | Windows-64Bits
10:40:09 : UR connection mode is defined with the HWrst reset mode
10:40:14 : ST-LINK error (DEV_USB_COMM_ERR)
10:40:14 : Error: Problem occured while trying to connect
Changing to software reset
10:41:23 : UR connection mode is defined with the SWrst reset mode
10:41:28 : ST-LINK error (DEV_USB_COMM_ERR)
10:41:28 : Error: Problem occured while trying to connect
And then, when I click refresh interfaces the STLINK interface disappears.
Disconnecting from USB and reconnecting, when I try to update firmware and open device in update mode it gives
Error connecting to device ST-LINK/V2 (error 0x21); check the USB connection and refresh the device list
The firmware version is: V2J29S7
Solved! Go to Solution.
2025-12-12 9:35 PM
Okay, I fixed my own problem. After updating the firmware with this utility in Windows the STLINK is now detectable and reads target voltage
https://www.st.com/en/development-tools/stsw-link007.html
2025-12-08 5:48 AM
Solid red means enumeration worked. Try a different cable and remove any hubs in the chain.
2025-12-08 6:28 AM
Hi!
I tried as suggested with a different cable, one that was from a hard drive that has additional USB-A for power instead of the original USB cable that came with the STLINK ISOL, and the behavior remains the same.
Could 'hardened' Windows Defender settings prevent the programmer from working correctly or STM32CubeProgrammer from establishing a connection to it?
2025-12-08 6:42 AM
More things to try:
@JPFF wrote:Changing to software reset
That only affects the SWD/JTAG connection from the ST-Link to the Target microcontroller - it won't make any difference to the USB connection between the Host and the ST-Link.
Is the ST-Link connected to a Target?
2025-12-08 6:51 AM
It is not connected to any target...
I'll connect it and try again. Does it need to be connected to a target to be able to connect to the programmer?
2025-12-08 7:01 AM
@JPFF wrote:Does it need to be connected to a target to be able to connect to the programmer?
Shouldn't do.
2025-12-08 9:17 AM
Silly me, yes, when I click connect I'm not connecting to the programmer but rather to the target device.
Although I try to click upgrade firmware and it won't allow me to.
In the device manager under PORTS (COM & LPT) I don't have STMicroelectronics STLink Virtual COM port, but under Universal Serial Bus devices I have STM32 STLink.
The only USB devices I have connected to my desktop are keyboard, mouse and UPS. I'm connecting directly to an available port without any hubs in between.
2025-12-08 9:33 AM
@JPFF wrote:I don't have STMicroelectronics STLink Virtual COM port,.
What ST-Link do you actually have?
The V2 doesn't have a VCP.
2025-12-08 9:44 AM - edited 2025-12-08 9:46 AM
I have the ST-Link/v2 ISOL
So everything is setup correctly I'm assuming, although I'm unable to update firmware via STM32CubeProgrammer
I'm going to try and power PIN 1 to PIN 4 with 3.3V from a lab power supply and see if I get any reading of the target voltage on STM32CubeProgrammer.
2025-12-08 10:00 AM
I tried applying 3.3V with an external power supply between pin 1 and pin 4 but target voltage reading remains 0 in STM32CubeProgrammer