AT32F421 Series Reference Manual
2022.11.11 Page 75 Rev 2.02
5.8.5 Flash control register (FLASH_CTRL)
Kept at its default value
Low power mode enable
0: Low power mode disabled
1: Low power mode enabled
When this bit is set, the Flash controller lets Flash
memory go to low-power mode as soon as MCU enters
Deepsleep mode.
High level Flash access protection disable
When this bit is set, the user system data area is
automatically cleared by hardware; After a reset, it is
unlocked, and low-level access protection is still
present.
.This bit is automatically cleared by hardware by writing
1 to it.
Operation done flag interrupt enable
0: Operation complete interrupt disabled
1: Operation complete interrupt enabled
Error interrupt enable
This bit enables EPPERR or PROGERR interrupt.
0: Interrupt is disabled;
1: Interrupt is enabled.
User system data unlock success
This bit is set by hardware when the user system data is
unlocked successfully, indicating that erase/program
operation to the user system data is allowed.
This bit is cleared by writing “0”, which will re-lock the user
system data area.
Operation lock
This bit is set by default, indicating that Flash memory is
protected against operations. This bit is cleared by
hardware after unlock, indicating that erase/program
operation to Flash memory is allowed. Writing “1” can re-
lock Flash memory operations.
Erase start
An erase operation is triggered when this bit is set by
software. This bit is cleared by hardware after the
completion of the erase operation.
User system data erase
It indicates the user system data erase.
User system data program
It indicates the user system data program.
Bank erase
It indicates bank erase operation.
Sector erase
It indicates sector erase operation.
Flash program
It indicates Flash program operation.