the code (pulled via git ) only erases about half the flash. The flash memory, generally used to store. Those libs are so simple compared to what you have done to support complex STM32 boards. It uses SPI and it is a good an alternative … Full Chip Erase is intended to recover a protected Flash and will execute automatically when Erase is invoked from the Flash menu. uint32_t startAddress = 0x8040000 //starting from. Since STM32 is a microcontroller, it naturally follows that its has an on-chip FLASH memory. The Flash memory has the following main features : Capacity up to 1 Mbyte 128 bits wide data read Byte, half-word, word and double word write Sector and mass erase Flash erase cycles are long - really long - it can take several seconds to erase a Flash sector. Should be documented in the TRM of your STM32 MCU. This function checks whether a valid application exists in flash. Stm32 flash erase Connect the Target board to your PC using an USB cable.