![ARTERY AT32F435 Series Reference Manual Download Page 527](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592527.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 527
Rev 2.03
The user has to configure the time duration during which the NAND Flash shifts from the rising edge of
the XMC_NWE to the falling edge of the XMC_NWAIT into a SPHT register, and write the last address
byte into a special memory address section so that the XMC can perform write operations based on the
timings of the special memory timing register, as shown in Address 3 in Figure 24-20.
Figure 24-20
NAND wait functionality
XMC_A[17]
XMC_NCE[2]
XMC_D[7
:
0]
High-Z
ALE
Chip select
signal
Command
XMC_NWE
XMC_NOE
High
NRE
Data
signals
XMC_A[16]
CLE
Address0
Address1
Address2
Address3
XMC_NWAIT
R/B
SPHT+1
HCLK
XMC check
XMC_NWAIT
CPU write
command to
0x70010000
CPU write
address0 to
0x70020000
CPU write
address1 to
0x70020000
CPU write
address2 to
0x70020000
CPU write
address3 to
0x78020000
24.4.6 ECC computation
The NAND interface contains ECC computation module so that the data will be used for ECC
computation when the NAND interface access the NAND Flash. The computed value is stored into the
XMC_BK2ECC register.
To perform an ECC computation:
1.
Configure the ECCPGS bit to select the number of bytes to be computed by ECC module: 256,
512, 1024, 2048, 4096 or 8192 bytes.
2.
Enable the ECCEN bit.
3.
Read/write from and to the data section.
4.
After receiving/sending the same number of bytes as the value programed in the ECCPGS, the
XMC will store the ECC computed value into the XMC_BK2ECC registers.
5.
Software reads/write the last byte and waits until the FIFO flag is set.
6.
Software reads the XMC_BK2ECC register and performs the corresponding error correction routine.
7.
Clear the ECCEN bit by software. Repeat from 2 to 6.
Table 24-35
lists the ECC result bits corresponding to the number of bytes
ECCPGS
000
001
010
011
100
101
Number of
bytes
256
512
1024
2048
4096
8192
ECC result bits
ECC[21: 0]
ECC[23: 0]
ECC[25: 0]
ECC[27: 0]
ECC[29: 0]
ECC[31:0]
24.5 PC card
The PC card interface can drive PC cards. They are made of three memory spaces: IO memory space,
common memory space and attribute space, each of which has their individual on-chip signal and
timing register. The three memory spaces are accessible through different timings.
24.5.1 Operating mode
Pin function:
Pin signals vary from external memory to external memory. Table 24-36 lists typical pin signals.