Embedded Flash memory
RM0365
65/1080
DocID025202 Rev 7
Figure 6. Flash memory Mass Erase procedure
Option byte programming
The option bytes are programmed differently from normal user addresses. The number of
option bytes is limited to 8 (4 for write protection, 1 for readout protection, 1 for hardware
configuration, and 2 for data storage). After unlocking the FPEC, the user has to authorize
the programming of the option bytes by writing the same set of KEYS (KEY1 and KEY2) to
the FLASH_OPTKEYR register (refer to
for key values). Then,
the OPTWRE bit in the FLASH_CR register will be set by hardware and the user has to set
the OPTPG bit in the FLASH_CR register and perform a half-word write operation at the
desired Flash address.
2EAD&,!3(?#2?,/#+
&,!3(?#2?,/#+
9ES
.O
0ERFORMUNLOCKSEQUENCY
7RITEINTO&,!3(?#2?-%2
TO
7RITE&,!3(?#2?3424TO
AIC
9ES
&,!3(?32?"39
.O
#HECK%/0FLAGIN&,!3(?32
ANDTHENCLEARITBYSOFTWARE