bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
Row 0
Row 1
Row 2
Row 3
Row 508
Row 509
Row 510
Row 511
P1o
P1e
P1o
P1e
P1o
P1e
P1o
P1e
P2o
P2e
P2o
P2e
P4o
P4e
P8e
P8o
P8e
P8o
P8e
P8o
P8e
P8o
P16e
P16o
P16e
P16o
P2048e
P2048o
512 byte input
bit7
bit5
bit3
bit1
bit7
bit5
bit3
bit1
bit7
bit5
bit3
bit1
bit7
bit5
bit3
bit1
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
Row 508
Row 509
Row 510
Row 511
P1o
P1o
P1o
P1o
P2o
P2o
P4o
P8o
P8o
P8e
P8o
P8e
P8o
P16o
P16e
P16o
P2048o
GPMC
shows ECC computation for a 512-byte data stream (read or write). The result includes six
column parity bits (P1o-P2o-P4o for odd parities, and P1e-P2e-P4e for even parities) and eighteen row
parity bits (P8o-P16o-P32o--P1024o- - P2048o for odd parities, and P8e-P16e-P32e--P1024e- P2048e for
even parities).
For a 2 Kbytes page, four 512 bytes ECC calculations plus one for the spare area are required. Results
are stored in the GPMC_ECCj_RESULT registers (j = 1 to 9).
Figure 7-34. ECC Computation for a 512-Byte Data Stream (Read or Write)
7.1.3.3.12.3.1.4 ECC Comparison and Correction
To detect an error, the computed ECC result must be XORed with the parity value stored in the spare
area of the accessed page.
•
If the result of this logical XOR is all 0s, no error is detected and the read data is correct.
•
If every second bit in the parity result is a 1, one bit is corrupted and is located at bit address (P2048o,
P1024o, P512o, P256o, P128o, P64o, P32o, P16o, P8o, P4o, P2o, P1o). The software must correct
the corresponding bit.
•
If only one bit in the parity result is 1, it is an ECC error and the read data is correct.
7.1.3.3.12.3.1.5 ECC Calculation Based on 8-Bit Word
The 8-bit based ECC computation is used for 8-bit wide NAND device interfacing.
The 8-bit based ECC computation can be used for 16-bit wide NAND device interfacing to get backward
compatibility on the error-handling strategy used with 8-bit wide NAND devices. In this case, the 16-bit
wide data read from or written to the NAND device is fragmented into 2 bytes. According to little-endian
access, the least significant bit (LSB) of the 16-bit wide data is ordered first in the byte stream used for 8-
bit based ECC computation.
313
SPRUH73H – October 2011 – Revised April 2013
Memory Subsystem
Copyright © 2011–2013, Texas Instruments Incorporated