cancel
Showing results for 
Search instead for 
Did you mean: 

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

DD.2
Associate

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?

8 REPLIES 8
berendi
Principal

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

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

berendi
Principal

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.

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

Out of the box firmware:

On ST board some sort of demonstration is loaded, this is available on ST site or repository of IDE.

On chip bought from distribution just erased flash no frimware other than ROM bootloader.

On non ST board some sort of demo firmware available or not.

Bought a couple of cheap stm32F030 board from china, all of them carry'd hello world demo.

No reason to, many of them where code protected so must be "full chip erased" to use. No need to know how original firmware was.

Some ST boards are shipped with a demo firmware loaded, a blinky on simpler boards, some graphical application on boards with a LCD display.

S.Ma
Principal

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.

Hi Berendi, agree as I wrote, about this some note on ST board:

Large board Demonstration use old ADAFruit LCD, this one is obsoleted and hard to find in time

Nano form use Gravitech board more hard to find.

Demo on 429 series preclude network and ADAFruit shield.

Lot of time to adapt examples and board require rework to use network and shield. Good learning to use part on custom board.

IDE need more attention on product usability.