Skip to main content
Visitor II
July 14, 2020
Question

What exactly does a full chip erase through ST-Link do? Would it brick my board?

  • July 14, 2020
  • 3 replies
  • 8084 views

I've been having trouble connecting my board through the STM IDE. I've decided that I want to in a sense 'factory reset' the board. Would a full chip erase do this or would it ruin my board?

    This topic has been closed for replies.

    3 replies

    Visitor II
    July 14, 2020

    No, you can always load a new firmware after a full erase.

    DD.2Author
    Visitor II
    July 14, 2020

    How do you load new firmware after a full erase? (The original, 'out of the box' firmware)

    Visitor II
    July 14, 2020

    Hello, what you mean with "original firmware"?

    'm thinking Arduino usage of 40 yr old hardware introduced some wrong concept to.

    Bootloader on oldest machines was loaded by hand thru front panel keyboard or switches.

    PDP 11 Front panel switches (bootloader was loaded word by word)

    After advent of uProcessor bootloader where on prom.

    Lady Ada brief history

    On some microcontroller where loaded on eprom or flash.

    Nowaday modern hardware bootloader reside in ROM, so never got cancelled.

    Also JTAG nor SWD need bootloader. Bootloader serve to upgrade firmware when JTAG or debug hardware went disabled by code protection. (as when bought)

    Hey this is not Arduino! This is not 40Yr old microController.

    Code protection is reversible so full erase clear all flash then clear protection bit. (Factory reset)

    Regards

    Visitor II
    July 14, 2020

    If you had saved it, then just load it using the ST-Link Utility, Cubeprogrammer, or one of the dozen programmer software out there.

    If you had not, then you have to find it on the net, maybe on the ST homepage, or ask ST support nicely to mail you the binary. Be sure to get the one for your board, loading a firmware meant for another board might damage yours.

    If you have more than one identical boards, you can save it (using ST-Link Utility) from one still having the original firmware.

    The source code for the original firmware is usually distributed in the STM32Cube_FW package for your MCU series, you might be able to compile and run it.

    Visitor II
    July 14, 2020

    When people order MCU from distributor, the flash is erased: at power on the bootloader will automatically activate.

    Do a mass erase with cube programmer or else and you'll get back to normal.

    Mass erase is a logical step if some chip protections have been activated.

    Otherwise, I just from IDE go to debug mode and the STLink will program the flash with my SW automatically.