AT32F421
Series Reference Manual
2022.11.11
Page 61
Rev 2.02
User system data area
The system data will be read from the information block of Flash memory whenever a system reset
occurs, and saved in the user system data register (FLASH_USD) and erase/programming protection
status register (FLASH_EPPS).
Each system data occupies two bytes in which the low bytes represent the system data, and the high
bytes represent the inverse code of system data. This is designed to verify the correctness of the
selected bit. When the high byte is not equal to the inverse code of the low byte (except when both high
and low bytes are all 0xFF), the system data loader will generate a system data error flag (USDERR)
forcing the system data and its inverse code to 0xFF.
Note: The update of the contents in the user system data area becomes effective only after a
system reset.
Table 5-4
User system data area
Address
Bit
Description
0x1FFF_F800
[7: 0]
FAP[7:0]:
Flash memory access protection (Access protection
enable/disable result is stored in the register FLASH_USD bit [1] and
bit [26]
0xA5: Flash access protection disabled
0XCC: High-level Flash access protection enabled
Others: Low-level Flash access protection enabled
[15: 8]
nFAP[7: 0]:
Inverse code of FAP[7: 0]
[23: 16]
SSB[7:0]:
System setting byte
(saved in the bit [9: 2] of the FLASH_USD register)
Bit 7: 5
Reserved
Bit 4 (nBOOT1)
nBOOT1: This bit, along with BOOT0,
defines boot mode.
When BOOT0 = 1:
0: Boot from SRAM
1: Boot from boot memory
Bit 3
Reserved
Bit 2 (nSTDBY_RST)
0: Reset occurred when entering
Standby mode
1: No reset occurred when entering
Standby mode
Bit 1 (nDEPSLP_RST)
0: Reset occurred when entering
Deepsleep mode
1: No reset occurred when entering
Deepsleep mode
Bit 0 (nWDT_ATO_EN)
0: Watchdog is enabled
1: Watchdog is disabled
[31: 24]
nSSB[7: 0]:
Inverse code of SSB[7: 0]
0x1FFF_F804
[7: 0]
Data0[7:0]:
User data 0
(It is stored in the bit [17:10] of the FLASH_USD register)
[15: 8]
nData0[7: 0]:
Inverse code of Data0[7: 0]
[23: 16]
Data1[7:0]:
User data 1
(It is stored in the bit [25: 18] of the FLASH_USD register)
[31: 24]
nData1[7: 0]:
Inverse code of Data1[7: 0]
0x1FFF_F808
[7: 0]
EPP0[7:0]:
Flash erase/write protection byte 0 (stored in the bit [7: 0]
of the FLASH_EPPS register)
This field is used to protect sector 0~sector 31 of main Flash memory.
Each bit takes care of 4 sectors (1 KB per sector)
0: Erase/write protection is enabled
1: Erase/write protection is disabled
[15: 8]
nEPP0[7: 0]:
Inverse code of EPP0[7: 0]
[23: 16]
EPP1[7:0]:
Flash erase/write protection byte 1 (stored in the bit [15:
8] of the FLASH_EPPS register)
This field is used to protect sector 32~sector 63 of main Flash memory.
Each bit takes care of 4 sectors (1 KB per sector)
0: Erase/write protection is enabled
1: Erase/write protection is disabled
[31: 24]
nEPP1[7: 0]:
Inverse code of EPP1[7: 0]
0x1FFF_F80C
[7: 0]
EPP2[7:0]:
Flash erase/write protection byte 2 (stored in the bit [23:
16] of the FLASH_EPPS register)
Reserved
[15: 8]
nEPP2[7: 0]
: Inverse code of EPP2[7:0]