cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link_CLI.exe can't find STM32MCU for USB3.0 at Win10

New.Fish
Associate III

I'm using ST-Link_CLI.exe command line to programming our product in test jig, the previous tester is using Win7, it seems works reliable, but now update to Win10 and get problem with power up the tester.

When powerup the tester, the PC can detect the ST-Link, but can't detect the STM32MCU, I must unplug the USB and plug in it again, then it can detect the STM32MCU, it will be very annoying to unplug and plug the USB for every unit. I update the ST-Link to latest firmware, it still the same.

I use "STM32 ST-Link Utility" to check , the Win 7 PC works stable when power off/on, but Win 10 PC very often can't connect to my STM32MCU (40 % possibility).

My Win 10 "STM32 ST-Link Utility" is the latest version:

ST-Link Utility: V4.6.0.0

STLinkUSBDriver.dll V5.1.2.0

ST-LINK_CLI.exe V3.6.0.0

I'm using "ST-LINK_CLI" and "STLinkUSBDriver.dll" for my tester coding, should I add something extra for Win10? There is "en.stsw-link009", should I add this to Win 10?

Regards

Sam

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

It looks like your question is answered, so please mark this topic as answered by choosing Select as Best for the favourite answer. This will help other users find that answer faster.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

10 REPLIES 10
Peter BENSCH
ST Employee

Regardless of the fact that there are many users who work with Windows 10 and USB3 without any problems, the ST-Link Utility is not recommended for new designs anymore, please upgrade to the multiplatform tool STM32CubeProgrammer. It also comes with a CLI, the commands of which are very similar to those of the predecessor and require little or no adaptation.

If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.

Good luck!

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi Peter,

Thanks for your reply.

I was using "ST -Link Utility" for long time, didn't realize "STMCubeProgrammer", when was it available?

"STMCubeProgrammer" is installed in my PC, I can find "STM32_Programmer_CLI.exe", "STLinkUSBDriver.dll" and " "FlashLoader",

but I can't find the "Command line usage" document, is it exactly same as "ST -Link Utility" which described in "UM0892 Usewr Manual for ST-Link utility"?

Regards

Samuel

The description for CLI can either be found in UM2237, section 3, or you get it directly by starting STM32_Programmer_CLI.exe (under Windows, Linux/MacOSX may differ) without argument.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Find this document, there are some different from UM0892.

In my case, there are two USB ST-Link in the tester which connected to two MCU: STM32F417 and STM32F091, I need identify the MCU and program flash with different binary/hex file.

I will update my coding accordingly.

Regards

Samuel

There is "list" command in ST-Link utility to list all connected ST-Link probe and serial number.

But the "list" command in STM32_Programmer_CLI can only list serial port.

There are two ST-Link connected to our tester, how can we check if there are multiple ST-Link connected?

Regards

Samuel

ST-LINK_CLI only supports JTAG and SWD, which can be listed using the command line switch -List.

STM32_Programmer_CLI connects via UART, USB, SPI, I2C or CAN. The list command lists at least DFU, SWD and UART connected devices, so maybe the footnote at UM2237, section 3.2.9, should be updated. I've attached an example screenshot of two connected boards with ST-LINK/V2-1 (nbstlink=0...1), one of which offers a virtual COM port, which is also listed:

0693W00000ANEweQAH.pngRegards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
New.Fish
Associate III

Hi Peter,

Finally two ST-Link can program my board now in my Win10 PC.

I try to copy my files to another old test PC runs win32 bit win10 OS, but I get problem to install "STM32 CubeProgrammer",

it keep give me error message:

This application was configured to use a bundled Java Runtime Environment

but the runtime is missing or corrupted.

I install the latest "Java", but it still get same error, how to fix it?

The UM2237 mentioned above also lists under system requirement:

There is no need to install any Java™ SE Run Time Environment since version 2.6.0.

The STM32CubeProgrammer runs with a bundled JRE available inside the downloaded package and no longer with the one installed on your machine.

Please reinstall (not copy) STM32CubeProgrammer again on that machine.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
New.Fish
Associate III

Hi Peter,

I download 32-bit STM32CubeProgrammer for my old PC which runs 32-bit Win10, problem fixed.

As general, STM32CubeProgrammer is reliable than ST-Link Utility, but it still lost communication occasionally.

Here is the condition for my testing:

  1. Two ST-Link/V2 with firmware V2J37S7 permanently connected to STM32F417, STMF09
  2. Turn off/turn on the power supply for the MCU, make connection, it can't connect sometimes, and must unplug the USB to restore the communication.
  3. Only my new PC lost communication, my old Win10 PC reliable.
  4. Connect to PC USB port is reliable. Connect via USB hub will lost communication, the one lost communication is USB3.0, another one works reliable but I can't works out USB2.0 or USB3.0

Hope those information will help ST to improve the STM32CubeProgrammer .

Regards

Samuel