AT32F425
Series Reference Manual
2022.03.30
Page 70
Ver 2.01
Figure 5-3
Flash memory programming process
OBF = 0?
Set the FPRGM bit = 1 in
FLASH_CTRL
Write word/half-word/byte
(32bits/16 bits/8bits) data
No
Yes
Start
Check the OBF bit in
FLASH_STS
No
Check the OBF bit in
FLASH_STS
OBF = 0?
Yes
Read EPPERR bit
、
PRGMERR
bit and ODF bit in FLASH_STS
End
5.2.4
Read operation
Flash memory can be accessed through AHB bus of the CPU.
5.3
Main Flash memory extension area
Bootloader code area can also be programmed as the extension area of the main Flash memory to store
user-application code. When used as main Flash memory extension area, it behaves like the main Flash
memory, including read, unlock, erase and programming operations.
5.4
User system data area operation
5.4.1
Unlock/lock
After reset, user system data area is protected, by default. Write and erase operations can be performed
only after the Flash memory is unlocked before the unlock operation for the user system data area.
Unlock procedure:
Flash memory block can be unlocked by writing KEY1 (0x45670123) and KEY2 (0xCDEF89AB) to the
FLASH_UNLOCK register;