Page 1 of 1

Firmware upgrade issue of ST-Link V2

Posted: Thu Nov 25, 2021 8:46 pm
by mebab
My St-Link failed for an unknown reason while programming my Stm32 based board. I had to get another one. The new one holds an old firmware version (V2.J17.S4). I tried a lot to upgrade it to a newer version with no luck. I even tried older versions of the ST-Link utility that didn't work for me. The message is: Upgrade error, Please try again.

I couldn't find a solution after a long search and trying several versions of the firmware. Meanwhile, when I use STM32CubeProgrammer, I receive the same error message.
Does anybody know how to fix this issue and upgrade the proposed ST-Link?

Many thanks in advance

Re: Firmware upgrade issue of ST-Link V2

Posted: Fri Nov 26, 2021 5:47 am
by fpiSTM
Is it a legacy STLink?

Re: Firmware upgrade issue of ST-Link V2

Posted: Fri Nov 26, 2021 6:45 am
by mebab
It is ST-Link V2 Programmer Mini
Something similar to the picture in the following like:
https://www.majju.pk/product/st-link-v2 ... emulator/

Re: Firmware upgrade issue of ST-Link V2

Posted: Fri Nov 26, 2021 10:25 am
by fpiSTM

Re: Firmware upgrade issue of ST-Link V2

Posted: Fri Nov 26, 2021 2:21 pm
by mebab
Thanks anyway!
In fact, I already applied all those suggestions but didn't work for me.

Re: Firmware upgrade issue of ST-Link V2

Posted: Sat Nov 27, 2021 1:08 pm
by Ozymandias
ST are now checking if the ST-Link V2 is using a valid ST chip and refusing to update the firmware if non genuine.

Both of my Chinese clones fail to upgrade to the latest firmware. Opening one of them shows it has a CKS32F103.

Looking on the web some of the clones seem to work but it seems to be a bit of pot luck if the clone has been made using a genuine chip.

Re: Firmware upgrade issue of ST-Link V2

Posted: Sat Nov 27, 2021 3:10 pm
by mebab
Yes. Seems that there are many non-original versions in the market! My ST-Link dongle couldn't be upgraded as expected too.
I use Arduino IDE to program my STM32 board. However, it cannot upload the sketch to STM32 just because the firmware on the ST-Link is old.

Working around the matter, luckily I could design an unusual solution that could solve my problem and programed my STM32 afterward.

Steps to go:
If you are able to upgrade the firmware, just do that. You don't need to follow the next steps. Otherwise:

1. Make a binary file from your sketch in Arduino IDE (Sketch --> Export compiled Binary). This will create a .bin file in the same folder as your sketch is.
2. In STM32 ST-Link utility: open that ".bin" file.
3. Since the target board cannot be connected via ST-Link yet, we need to disconnect and then connect the target STM32 board via the problematic ST-Link.
4. Immediately press Program verify. If this doesn't work, close ST-Link utility and again open it and repeat the mentioned process.
5. In the new window, press Start.

In this stage, the binary program starts to be uploaded on the target board (your STM32). After it is done, you are done. ;)
I have made a Youtube link describing it as:
https://www.youtube.com/watch?v=cprE-aVBiAU


Bests,
Mehrdad