IT lexicon › Hardware › Mass erase

Mass erase

Hardware På svenska → Updated: 2026-11-05

Wiping a microcontroller's entire on-chip flash in one go rather than page by page.

Flash can only turn bits from one to zero; going back means erasing a whole block to 0xFF. Most microcontrollers offer three sizes: page, sector and everything. Mass erase is the quickest, and it is what debug probes and vendor tools such as STM32CubeProgrammer do before writing fresh firmware when nothing needs preserving.

It also has a security role. On STM32 the only way down from read-out protection level 1 to level 0 is to change the option bytes, at which point the chip triggers a mass erase by itself. You get debug access back, but only to an empty chip — the firmware cannot be read out, merely replaced. Anyone who forgot that their EEPROM emulation lives in the same flash tends to find out afterwards.

← Back to the lexicon