Before undertaking the task of writing a software ECC module, or a software interface to a hardware ECC module, you should evaluate whether or not modifications to the controller layer are needed as well. Some hardware ECC modules integrated within a NAND device or a micro-controller’s memory controller can be handled through a generic controller extension module.
However, if your ECC module can be interfaced with the software ECC generic controller extension, you could limit the code to be developed to the ECC layer only. If this is the case, you will need to provide the implementation of the API as shown in Listing 15-11:
Listing 15-11 ECC API type definition
L15-11(1) Minimum buffer length that the ECC module can handle.
L15-11(2) Maximum buffer length that the ECC module can handle.
L15-11(3) Length, in octets, of the code for a single buffer.
L15-11(4) Number of bits the module can correct for each buffer.
L15-11(5) Pointer to the code calculation function.
L15-11(6) Pointer to the error detection function.
L15-11(7) Pointer to the error correction function.
For more details on the implementation, please refer to the µC/CRC User Manual.