cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer Unable to detect ST-LINK ISOL

JPFF
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
JPFF
Associate II

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

 

View solution in original post

11 REPLIES 11
TDK
Super User

Solid red means enumeration worked. Try a different cable and remove any hubs in the chain.

If you feel a post has answered your question, please click "Accept as Solution".
JPFF
Associate II

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?

Andrew Neil
Super User

More things to try:

https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/tac-p/698105/highlight/true#M956

 


@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?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

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? 


@JPFF wrote:

Does it need to be connected to a target to be able to connect to the programmer? 


Shouldn't do.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

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.


@JPFF wrote:

I don't have STMicroelectronics STLink Virtual COM port,.


What ST-Link do you actually have?

 

AndrewNeil_0-1765214906292.png

B-STLINK-ISOL

AndrewNeil_1-1765215044435.png

ST-Link/v2 ISOL

 

The V2 doesn't have a VCP.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

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.

I tried applying 3.3V with an external power supply between pin 1 and pin 4 but target voltage reading remains 0 in STM32CubeProgrammer