DocID025202 Rev 7
62/1080
RM0365
Embedded Flash memory
80
Figure 4. Programming procedure
The Flash memory interface preliminarily reads the value at the addressed main Flash
memory location and checks that it has been erased. If not, the program operation is
skipped and a warning is issued by the PGERR bit in FLASH_SR register (the only
exception to this is when 0x0000 is programmed. In this case, the location is correctly
programmed to 0x0000 and the PGERR bit is not set). If the addressed main Flash memory
location is write-protected by the FLASH_WRPR register, the program operation is skipped
and a warning is issued by the WRPRTERR bit in the FLASH_SR register. The end of the
program operation is indicated by the EOP bit in the FLASH_SR register.
The main Flash memory programming sequence in standard mode is as follows:
5HDG)/$6+B&5B/2&.
)/$6+B&5B/2&.
<HV
1R
<HV
1R
3HUIRUPXQORFNVHTXHQF\
:ULWH)/$6+B&5B3*WR
3HUIRUPKDOIZRUGZULWHDWWKH
GHVLUHGDGGUHVV
)/$6+B65B%6<
&KHFNWKHSURJUDPPHGYDOXH
E\UHDGLQJWKHSURJUDPPHG
DGGUHVV
DLE