Skip to main content
Explorer
November 7, 2022
Solved

Is it possible to restore ST-Link Firmware (Factory reset)?

  • November 7, 2022
  • 4 replies
  • 11019 views

I got my STM32H745I-DISCO (STM32H745XIH6U) kit and wanted to update st-link (STLINK-V3E) firmware. Unfortunately I used unreliable USB cable and it got probably disconnected during the process. Now the STLinkUpgrade shows the line "Unknown firmware type. Don't know how to upgrade."

Is there any chance to restore original firmware? Or do I have to use external ST-Link/buy new board?

Thank you in advance.

    This topic has been closed for replies.
    Best answer by DLich.3

    Solution

    Thanks to this page I was able to successfully restore original ST-Link Firmware using the following command:

    java -jar STLinkUpgrade.jar -d8_d32_msc_br -force_prog

    STLinkUpgrade.jar is part of the ST-Link boards firmware upgrade package.

    4 replies

    Graduate II
    November 7, 2022

    you need to find the stlinkV3 binaries, i personally dont know where they could be found, or if ST is providing them.

    There is also thirds party debuggers you could flash instead (in case of desperation)

    https://github.com/ARMmbed/DAPLink/issues/662

    DLich.3Author
    Explorer
    November 14, 2022

    I believe I was able to find st-link firmware binaries and even bootloader binaries, however I have no idea how to dump them to the board.

    Graduate II
    November 7, 2022

    Power the STLINKV3, reset the F733 and the STLink bootloader should re-appear. Use the firmware updater to reflash.

    DLich.3Author
    Explorer
    November 14, 2022

    If you mean connecting the NRST pin of the STM32F723 (U16 part) to the 0V potential (JP3), then it did not work. If you mean connecting BOOT0 to 3,3V it didn't work either.

    Can you please tell me if I did anything wrong or misunderstood what you said?

    DLich.3AuthorAnswer
    Explorer
    November 14, 2022

    Solution

    Thanks to this page I was able to successfully restore original ST-Link Firmware using the following command:

    java -jar STLinkUpgrade.jar -d8_d32_msc_br -force_prog

    STLinkUpgrade.jar is part of the ST-Link boards firmware upgrade package.

    Visitor II
    September 30, 2023

    I have NUCLEO-U575ZI-Q with board MB1549C.

    With -d8_d32_msc_br I get 

    The specified firmware type does not match the detected one: can not update.

    (Seems the parameter is for certain Nucleo type)

    Without it, the upgrade tries to upgrade the firmware to the same version (not the one I had from the factory, but the latest one I tried and faild) and fails.

    Any advice?

    Some sample output:

    cd ~/Downloads/stsw-link007-3/AllPlatforms

    /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.jre.macos64_3.0.0.202305091045/jre/Contents/Home/bin/java -jar STLinkUpgrade.jar -force_prog

    Firmware version detected: V3J11M3

    ...libusb: warning [darwin_transfer_status] transfer error: timed out

    JNI command error 0x1001 after cmd [-13, 1, 0, 0, 71, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0]

    Upgrade Error, Please try again.

    Upgrade is successful.

    libusb: warning [darwin_transfer_status] transfer error: device not responding (value = 0xe00002ed)

    JNI command error 0x1004 after cmd [-13, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

    Ignore USB com lost due to reset when exiting upgrade mode.

    libusb: warning [darwin_transfer_status] transfer error: device not responding (value = 0xe00002ed)

    JNI command error 0x1004 after cmd [-15, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

    Failure exiting upgrade mode (Error 33).

     

    With newest version of STLinkUpgrade.jar: (After I tried with J11 and failed!)

    cd ~/Downloads/stsw-link007/AllPlatforms

    /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.jre.macos64_3.0.0.202305091045/jre/Contents/Home/bin/java -jar STLinkUpgrade.jar -force_prog

    Firmware version detected: V3J11M3

    ..libusb: warning [darwin_transfer_status] transfer error: timed out

    JNI command error 0x1001 after cmd [-13, 1, 0, 0, 63, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0]

    Upgrade Error, Please try again.

    Upgrade is successful.

    libusb: warning [darwin_transfer_status] transfer error: device not responding (value = 0xe00002ed)

    JNI command error 0x1004 after cmd [-13, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

    Ignore USB com lost due to reset when exiting upgrade mode.

    libusb: warning [darwin_transfer_status] transfer error: device not responding (value = 0xe00002ed)

    JNI command error 0x1004 after cmd [-15, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

    Failure exiting upgrade mode (Error 33).

     

     

    Visitor II
    September 30, 2023

    "Solved"

    This seems to be related to my USB connection on MacOS (M1).

    Using a hub/converter from USB-C to USB and connecting to the Nucleo using a USB-USBmicro cable. When I start the ST-Link fw updater the red light blinks a while (showing that data transfer occurs) and then stops.

    I tried to update using the STLinkUpgrader.jar on Ubuntu and succeeded.

    Will browse the documents on "how to connect to STLink port on NUcleo from USB-C on Mac"

    Graduate
    December 21, 2024

    I have Nucleo-F303K8 and With -d8_d32_msc_br I get  following.

    C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Drivers\FirmwareUpgrade>"c:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\jre\bin\java.exe" -jar STLinkUpgrade.jar -d8_d32_msc_br -force_prog
    Firmware version detected: V0J0M0B0S0
    The up-to-date firmware is too big for this board (27840 bytes in excess). Can't update.
    Version read: V15.J63.M0.B0.S63.P0

    I hope to restore firmware for this Nucleo-F303K8.

    Is there any solution on this case ?

    regards

    Shigemal