AN1823 Application Note: Error Correction Code in NAND Flash Memories
AN1823 Application Note: Error Correction Code in NAND Flash Memories
AN1823
APPLICATION NOTE
This Application Note describes how to implement an Error Correction Code (ECC), in ST NAND Flash
memories, which can detect 2-bit errors and correct 1-bit errors per 256 Bytes.
This Application Note should be downloaded with the c1823.zip file.
INTRODUCTION
When digital data is stored in a memory, it is crucial to have a mechanism that can detect and correct a
certain number of errors. Error Correction Codes (ECC) encode data in such a way that a decoder can
identify and correct certain errors in the data.
Studies on Error Correction Codes started in the late 1940's with the works of Shannon and Hamming,
and since then thousands of papers have been published on the subject.
Usually data strings are encoded by adding a number of redundant bits to them. When the original data is
reconstructed, a decoder examines the encoded message, to check for any errors.
There are two basic types of Error Correction Codes (see Figure 1.):
■ Block Codes, which are referred to as (n, k) codes. A block of k data bits is encoded to become a
block of n bits called a code word.
■ Convolution Codes, where the code words produced depend on both the data message and a given
number of previously encoded messages. The encoder changes state with every message
processed. The length of the code word is usually constant.
NAND Flash memories typically use Block Codes.