6 years, 6 months ago.

Install ST-LINK drivers on Win7 *after* STM32F103 board was plugged in for the first time

Hi,

I was too quick in unboxing my STM32F103 board and plugging it right into a free USB port of my laptop. It did not automatically install the correct drivers and so it does not come up a mass storage device.

When now trying to install the ST-LINK USB drivers (I downloaded here), I am getting error all the time from Windows that installation has failed.

Too late I have read here in the instructions that drivers need to be installed *before* board is plugged in for the first time.

Now - is there a way to reset my Windows 7 to a state where I will be able to install the drivers?

I did check device manager but there is no unregistered device flagged (so I can not simply update drivers using windows device manager), I also power cycled laptop and STM32 baord a few times without success.

Thanks for your help! Torsten

Question relating to:

ST
A world leader in providing the semiconductor solutions that make a positive contribution to people’s lives, both today and in the future.

2 Answers

6 years, 6 months ago.

Hello Torsten,

The following links may help you to remove hidden or "ghosted" drivers (COM ports and others) from your Windows 7 system:

https://helpdesk.flexradio.com/hc/en-us/articles/200883925-Removing-Hidden-or-Ghosted-Com-ports
https://learn.adafruit.com/how-to-find-hidden-com-ports/overview

Accepted Answer

Thanks for your answer Zoltan! I have thought(!) that the driver installation was causing my issues, but this was wrong.

In fact I have now found out that I was using a broken mini-USB cable to connect my STM32 board to the PC. The cable did provide power to the board, so I was not suspicious, but it did not transmit any data lines from board to PC. And that has in the end caused the issue where the board was not showing up as mass storage.

With the new cable I can see the board as USB mass storage, also the driver installation was successful on another attempt.

posted by Torsten Kraff 17 Oct 2017

Mr Hudak,

i got similar problem here. my ST Link v2 USB dongle com port is not detected by my PC. i have done like the links you've shared from open the 'command prompt', wrote the commands. when i opened the Device Manager, set the hidden view on, i found no unused com port. i have tried to manually add the com port for the ST Link but it was not working, too. what should i do?

posted by Edwar Baihaqi 17 Oct 2017

Hello Edwar,

Try to install an ST-LINK/V2 driver onto your PC as suggested below by Bill.

posted by Zoltan Hudak 17 Oct 2017

i did sir. the driver is successfully installed. i also have tried the hello code script from your thread, downloaded it into the board using ST Link Utility, and the program went well. the led is successfully blinky (thank you very much :D) but the problem was, i wanted to see the printf result (hello world) through serial monitor application (i used TeraTerm that time) but i could not do that because my laptop did not read the ST Link v2 as COM port, but only as USB controller only when i checked in the Device Manager. i also have tried the link that you have given in your answer above, but also did not work. what should i do?

posted by Edwar Baihaqi 17 Oct 2017

Unfortunately, I have no idea how to use an ST Link v2 USB dongle also as COM port. I'd suggest you to use an FTDI or similar USB to Serial TTL converter as explained here in section "Using serial port (not just for debugging)".

posted by Zoltan Hudak 18 Oct 2017

i have read your post. i can conclude that for programming purpose, we use the ST Link v2, and for monitoring the output such as printf command result, we use FTDI board. i will try as similar as your post. Thank you very much mr hudak

posted by Edwar Baihaqi 19 Oct 2017
6 years, 6 months ago.

Hmmm...the drivers for ST are only available on the ST website. Make sure you install the appropriate 32b or 64b version. https://os.mbed.com/teams/ST/wiki/ST-Link-Driver

Thanks for your answer Bill! I have thought(!) that the driver installation was causing my issues, but this was wrong.

In fact I have now found out that I was using a broken mini-USB cable to connect my STM32 board to the PC. The cable did provide power to the board, so I was not suspicious, but it did not transmit any data lines from board to PC. And that has in the end caused the issue where the board was not showing up as mass storage.

With the new cable I can see the board as USB mass storage, also the driver installation was successful on another attempt.

posted by Torsten Kraff 17 Oct 2017