
AT32F413
Series Reference Manual
2022.06.27
Page 65
Rev 2.00
Figure 5-2 Reference circuit for external memory
VDD
SPIM_CS
SPIM_IO1
SPIM_IO2
GND
R1
10K
R2
1K
SPIM_IO3
SPIM_SCK
SPIM_IO0
VDD
CS#
DO/DQ1
WP#/DQ2
VSS
VCC
HOLD#/DQ3
CLK
DI/DQ0
1
2
3
4
5
6
7
8
Table 5-4 Instruction set supported by external memory
Instruction
Code
FLASH_SELECT
register config.
Description
Write Enable
0x06
0x1/0x2
Both 0x1 and 0x2 Flash must support 0x06 instruction
Quad Page Program 0x32
0x1/0x2
Both 0x1 and 0x2 Flash must support 0x32 instruction
Sector Erase
0x20
0x1/0x2
Both 0x1 and 0x2 Flash must support 0x20 instruction
Chip Erase
0xC7
0x1/0x2
Both 0x1 and 0x2 Flash must support 0XC7 instruction
Read Status Register 0x05
0x1/0x2
Both 0x1 and 0x2 Flash must support 0x05 instruction
Quad I/O Read
0xEB
0x1/0x2
Both 0x1 and 0x2 Flash must support 0xEB instruction
24-bit Addr + 6x Dummy cycle
Volatile status
Register write
enable
0x50
0x1
When 0x1 Flash is selected, the hardware sends a
command automatically to configure the Quad Enable bit
of the Flash Status Register
0x1 Flash memory must support:
0x50 and 0x01
or 0x50 and 0x31
Write Status
Register-1
0x01
Write
Status Register-2
0x31
Note:
1. If it is mandatory to set the QE to 1 in the Status Register before executing 0x32 and 0xEB, then 0x1
Flash is selected by seting the FLASH_SELECT register to 0x1.
2. If it is not required to set the QE bit before executing 0x32 and 0xEB, then 0x2 Flash is selected by
seting the FLASH_SELECT register to 0x2.
For example,
If FLASH_SELECT register is set to 0x1:
D25Q127C, GD25Q64C,GD25Q32C,GD25Q16C,GD25Q80C and W25Q128V Flash memory are
supported.
If FLASH_SELECT register is set as 0x2: EN25F20A and EN25QH128A Flash memory are supported.
User system data area
The system data will be read from the information block of Flash memory whenever a system reset
occurs, and is saved in the user system data register (FLASH_USD)and erase programming protection
status register (FLASH_EPPS).
Each system data occupies two bytes, where the low bytes corresponds to the contents in the system
data area, and the high bytes represent the inverse code that is used 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 byte are all 0xFF), the system data loader will issue a system data error flag (USDERR) and the
corresponding system data and their inverse codes are forced 0xFF.