
RM0453 Rev 2
111/1454
RM0453
Embedded Flash memory (FLASH)
153
In fast programming, all the data must be written successively. MISSERR is set if the
previous data programming is finished and the next data to program is not written yet.
•
FASTERR
: fast programming error
In fast programming, FASTERR is set if one of the following conditions occurs:
–
When FSTPG bit is set for more than 7 µs (generating a time-out detection).
–
When the row fast programming is interrupted by a MISSERR, PGAERR,
WRPERR or SIZERR.
If an error occurs during a program or erase operation, one of the following error flags is set
in FLASH_SR and FLASH_C2SR:
•
PROGERR, SIZERR, PGAERR, PGSERR, MISSERR (program error flags)
•
WRPERR (protection error flag)
In this case, if the error interrupt enable bit ERRIE is set in FLASH_CR or FLASH_C2CR, an
interrupt is generated and the operation error flag OPERR is set in FLASH_SR and
FLASH_C2SR.
Note:
If several successive errors are detected (for example, in case of DMA transfer to the Flash
memory), the error flags cannot be cleared until the end of the successive write request.
PGSERR and PGAERR in a page-based row programming
In case of fast programming, the table below describes how PGAERR and PGSERR are
handled.
After a system reset, no MER or PER is performed. Any programming attempt causes a
PGAERR and a PGSERR.
Programming errors causing a bus error
The error conditions listed below do not generate an error flag but a bus error instead:
•
AHB write to any page when RDP level 1 and boot is performed from the system Flash
memory or SRAM1
•
AHB write when the Flash memory is powered down
•
Read or write from the Flash memory through the debugger
•
Read from the Flash memory when fast row programming is ongoing, for the source
which requested the fast row programming
•
New programming request when the previous one is not finished
•
FLASH_CR register write between the two accesses of a double-word programming
•
FLASH_CR register write when PESD is active (set)
•
Write a wrong key in FLASH_KEYR or FLASH_OPTKEYR register
•
Any subsequent write to FLASH_KEYR or FLASH_OPTKEYR after unlocking the
respective feature
Table 15. Errors in page-based row programming
Last page/row
Current page/row
MER active
PPER active
page [x]/row [y]
page [x] / row [x-n]
PGAERR
PGAERR
page [x-n] / row [any]
PGAERR & PGSERR
PGAERR & PGSERR
page [x+n] / row [any]
No error
PGSERR