cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link Firmware Will Not Upgrade

sloops
Associate II

Hello,

I've been struggling with this issue for a couple days, I have a Nucleo-L476RG board that I am trying to run and debug in VS Code. 

I'm using the STM32CubeMX + STM32 VS Code Extension tool chain to create cmake files, build, and then debug, but I cannot run and debug code due to an error:

Error in initializing ST-LINK device.
Reason: ST-LINK firmware upgrade required. Please upgrade the ST-LINK firmware using the upgrade tool.

I have tried using the "Upgrade ST-Link Firmware" button in the VS Code Extension "STM32Cube Devices and Boards Menu" and I get the following error:

Fatal error while trying to update STLink Firmware. Source: STM32Cube Debug Core

So I installed STM32CubeProgrammer and tried to upgrade firmware from there. I get the following information about my device:

Serial Number: 066AFF485671664867215448

Firmware Version: V2J43M28

When I select the "Firmware Upgrade" button, it says 

Device 066AFF485671664867215448 not found. No device connected.

So I downloaded the STSW-LINK007 software, and tried to run ST-LinkUpgrade.exe for Windows. When I select "Device Connect" I get the following error:

No ST-Link found after GoToUsbLoader commend. Wait for the end of USB enumeration then try again.

I am at the end of my troubleshooting abilities. Is there something really obvious I am missing here?

 

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Super User

try to excluse hardware issues:

- try another USB cable

- try another USB port

- avoid hubs

- if possible, try another host

hth

KnarfB

 

View solution in original post

6 REPLIES 6
KnarfB
Super User

try to excluse hardware issues:

- try another USB cable

- try another USB port

- avoid hubs

- if possible, try another host

hth

KnarfB

 

sloops
Associate II

I just installed STM32CubeProgrammer on a different PC and had the same error when I tried to upgrade firmware. Unfortunately I don't have another USB Mini B cable but a new one should be delivered Friday so I can test it out

Imen.D
ST Employee

Hello @sloops 

Verify power pins and SWD connections.

Is it a genuine ST-Link? How to recognize a genuine ST-LINK/V2 versus a cloned one

Please refer to the article that may help you: How to solve connection errors when connecting and programming the STM32 target board

 
When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
sloops
Associate II

I'm using a Nucleo board with the integrated ST Link instead of a dedicated ST Link device. Not sure if there are Nucleo board clones but this one seems genuine?

 Nucleo Board - Copy.jpg

TDK
Super User

The connection is somewhat finicky with older ST-links unfortunately. I'm sure the board is fine. This is USB FS, so I doubt the cable is at fault. Try different ports and add/remove hubs as others have mentioned. Probably you can find a working combination.

If I connect my board through a hub, I see this problem. Without the hub, it works as expected.

There was also a thread where someone from ST mentioned the STM32F1 USB DFU was not robust with higher speed hubs. That may be at play here. I can't find this thread.

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

Update - I finally received the new USB cable today and it fixed the issue. Thanks everyone!