Microchip® Advanced Software Framework

nand_flash_ecc Struct Reference

NAND Flash ECC layer is called by upper layer, it will call the raw layer to do write/read operations, and do ECC check to the write/read result, it then will feedback the ECC check result to the upper layer.

  1. nand_flash_ecc_initialize is used to initializes an nand_flash_ecc instance.
  2. nand_flash_ecc_write_page is used to write a NAND Flash page with ECC result, the function will calculate ECC for the data that is going to be written, and write data and spare(with calculated ECC) to NAND Flash device.
  3. nand_flash_ecc_read_page is used to read a NAND Flash page with ECC check, the function will read out data and spare first, then it calculates ecc with data and then compare with the readout ECC, and feedback the ECC check result to upper layer.

#include <nand_flash_ecc.h>

Data Fields

struct nand_flash_raw raw
 

struct nand_flash_raw nand_flash_ecc::raw

Referenced by main(), and run_test_initialization().