I have successfully used the MFS nandflash filesystem on the Vybrid tower kit, but I am having no luck in getting it to work on our custom hardware.
Hardware have been verified using low level nand driver ()
I am using the msf_nandflash example code for testing.
First I got an assert in PageOrderMap::Init
entryCount was 512, and the comments in the code suggested that I needed to change to 16bit entries. I modified the code accordigly.
Second I get an error when trying to initialize the filesystem.
Traced it to nfc_wl.cpp, nfc_read_page_with_metadata:
/* ECC Fix FAILED */
result = NANDFLASHERR_ECC_FAILED;
I can't get past this error, have tried Changing the ECC_SIZE to 0, 4, 8
Always same result.
Nand device: MT29F16G16ADACAH4_IT
Device setup:
/* MT29F16G16ADACAH4_IT organization */
#define MT29F16G16_PHYSICAL_PAGE_SIZE 4096
#define MT29F16G16_SPARE_AREA_SIZE 224
#define MT29F16G16_BLOCK_SIZE 262144 /* 256kB */
#define MT29F16G16_NUM_BLOCKS 8192
#define MT29F16G16_WIDTH 16
Bsp nand setup:
const NANDFLASH_INIT_STRUCT _bsp_nandflash_init =
{
/* NAME */ "nandflash:",
#if BSPCFG_NANDFLASH_USE_DMA
/* Low level driver */ &_nandflash_nfc_dma_devif,
#else
/* Low level driver */ &_nandflash_nfc_devif,
#endif
/* NANDFLASH_INFO_PTR */ _MT29F16G16_organization_16bit,
/* VIRTUAL_PAGE_SIZE */ 540,
/* NUM_VIRTUAL_PAGES */ 1048576,
/* PHY_PAGE_SIZE_TO_VIRTUAL_PAGE_SIZE_RATIO */ 8,
/* ECC_SIZE */ 0,
/* WRITE_VERIFY */ 0,
/* DEVICE_SPECIFIC_DATA */ 0
};
Using MQX 4.1.2
/Jon