![Samsung S3C2416 User Manual Download Page 165](http://html.mh-extra.com/html/samsung/s3c2416/s3c2416_user-manual_340824165.webp)
S3C2416 RISC MICROPROCESSOR
NAND FLASH CONTROLLER
7-7
10.2 1-BIT ECC PROGRAMMING ENCODING AND DECODING
1. To use 1-bit ECC in software mode, reset the ECCType to ‘0’ (enable 1-bit ECC)‘. ECC module generates
ECC parity code for all read / write data when MainECCLock (NFCONT[7]) and SpareECCLock (NFCONT[6])
are unlocked(‘0’). You must reset ECC value by writing the InitMECC (NFCONT[5]) and InitSECC
(NFCONT[4]) bit as ‘1’ and have to clear the MainECCLock (NFCONT[7]) bit to ‘0’(Unlock) before read or
write data.
MainECCLock (NFCONT[7]) and SpareECCLock(NFCONT[6]) bit controls whether ECC Parity code is
generated or not.
2. Whenever data is read or written, the ECC module generates ECC parity code on register NFMECC0/1.
3. After you complete read or write one page (does not include spare area data), Set the MainECCLock bit to ‘1’
(Lock). ECC Parity code is locked and the value of the ECC status register will not be changed.
4. To generate spare area ECC parity code, Clear SpareECCLock (NFCONT[6]) bit to ‘0’ (unlock).
5. Whenever data is read or written, the spare area ECC module generates ECC parity code on register
NFSECC.
6. After you complete read or write spare area, set the SpareECCLock bit to '1' (Lock). ECC Parity code is
locked and the value of the ECC status register will not be changed.
7. From now on, you can use these values to record to the spare area or check the bit error.
8. For example, to check the bit error of main data area on page read operation, after generating of ECC codes
for main data area, you have to move the ECC parity codes (is stored to spare area) to NFMECCD0 and
NFMECCD1. From this time, the NFECCERR0 have the valid error status values.
NOTE
NFSECCD is for the ECC value in spare area. Usually, the user will write the ECC value generated from
main data area to Spare area, which value will be the same as NFMECC0/1.
10.3 4-BIT ECC PROGRAMMING GUIDE (ENCODING)
1. To use 4-bit ECC in software mode, set the MsgLength to 0(512-byte message length) and set the ECCType
to ‘1’(enable 4-bit ECC). ECC module generates ECC parity code for 512-byte write data. So, you have to
reset ECC value by writing the InitMECC (NFCONT[5]) bit as ‘1’ and have to clear the MainECCLock
(NFCONT[7]) bit to ‘0’(Unlock) before write data.
MainECCLock (NFCONT[7]) bit controls whether ECC Parity code is generated or not.
2. Whenever data is written, the 4-bit ECC module generates ECC parity code internally.
3. After you finish writing 512-byte data (not include spare area data), the parity codes are automatically updated
to NFMECC0, NFMECC1 register. If you use 512-byte NAND flash memory, you can program these values to
spare area. However, if you use NAND flash memory more than 512-byte page, you can’t program
immediately. In this case, you have to copy these parity codes to other memory like DRAM. After writing all
main data, you can write the copied ECC values to spare area.
The parity codes have self-correctable information include parity code itself.
4. To generate spare area ECC parity code, set the MsgLength to 1(24-byte message length), and set the
ECCType to '1'(enable 4-bit ECC). ECC module generates ECC parity code for 24-byte write data. So you
have to reset ECC value by writing the InitMECC (NFCONT[5]) bit as '1' and have to clear the MainECCLock
(NFCONT[7]) bit to ‘0’(Unlock) before write data.
MainECCLock (NFCONT[7]) bit controls whether ECC Parity code is generated or not.
5. Whenever data is written, the 4-bit ECC module generates ECC parity code internally.
6. When you finish writing 24-byte meta or extra data, the parity codes are automatically updated to NFMECC0,
NFMECC1 register. You can program these parity codes to spare area.
The parity codes have self-correctable information include parity code itself.
Summary of Contents for S3C2416
Page 122: ...BUS MATRIX EBI S3C2416X RISC MICROPROCESSOR 3 4 NOTES ...
Page 204: ...DMA CONTROLLER S3C2416X RISC MICROPROCESSOR 8 18 NOTES ...
Page 284: ...WATCHDOG TIMER S3C2416X RISC MICROPROCESSOR 11 6 NOTES ...
Page 320: ...REAL TIME CLOCK S3C2416X RISC MICROPROCESSOR 13 16 NOTES ...
Page 344: ...UART S3C2416X RISC MICROPROCESSOR 14 24 NOTES ...
Page 380: ...USB2 0 DEVICE S3C2416X RISC MICROPROCESSOR 16 34 NOTES ...
Page 432: ...2D S3C2416X RISC MICROPROCESSOR 18 38 NOTES ...
Page 446: ...HS_SPI CONTROLLER S3C2416X RISC MICROPROCESSOR 19 14 NOTES ...
Page 604: ...S3C2416X RISC MICROPROCESSOR S3C2416X RISC MICROPROCESSOR 23 22 NOTES ...
Page 638: ...PCM AUDIO INTERFACE S3C2416X RISC MICROPROCESSOR 25 18 NOTES ...
Page 670: ...ELECTRICAL DATA S3C2416X RISC MICROPROCESSOR 26 32 NOTES ...