This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

L138 NAND driver NAND_STATUS_READ_ECC_UNCORRECTABLE_ERROR

Other Parts Discussed in Thread: OMAPL138

I am trying to run L138 bootloader for ARM from the LCDK omap L138 starterware using the debugger.The NANDPageRead seems to fail always with NAND_STATUS_READ_ECC_UNCORRECTABLE_ERROR error.

I am using the same NAND lib for c6000  core in L138, i see the same problem.
I have ported the NAND lib to compile for C6000, NAND Setup and Open seems to be running without any issues. However when i read a page the ECC computation always seem to throw NAND_STATUS_READ_ECC_UNCORRECTABLE_ERROR.


Need urgent help.  I need to run NAND driver on DSP of L138 and then setup some sort of file system on it.

NandInfo structure as follows.

*(hNandInfo)    struct _NAND_INFO_    {chipSelects=[1,0,0,0],opMode=NAND_XFER_MODE_CPU,eccType=NAND_ECC_ALGO_RS_4BIT,manId=...    0x80006DD8    
    chipSelects    int[4]    [1,0,0,0]    0x80006DD8    
        [0]    int    1    0x80006DD8    
        [1]    int    0    0x80006DDC    
        [2]    int    0    0x80006DE0    
        [3]    int    0    0x80006DE4    
    opMode    enum NAND_XFER_MODE_    NAND_XFER_MODE_CPU    0x80006DE8    
    eccType    enum NAND_ECC_ALGO_    NAND_ECC_ALGO_RS_4BIT    0x80006DE9    
    manId    unsigned char    ,    0x80006DEA    
    devId    unsigned char    .    0x80006DEB    
    chipSelectCnt    int    1    0x80006DEC    
    dieCnt    int    1    0x80006DF0    
    busWidth    enum NAND_BUSWIDTH_    NAND_BUSWIDTH_16BIT    0x80006DF4    
    pageSize    enum NAND_PAGE_SIZE_    NAND_PAGESIZE_2048BYTES    0x80006DF6    
    blkSize    enum NAND_BLOCK_SIZE_    NAND_BLOCKSIZE_128KB    0x80006DF8    
    pagesPerBlk    unsigned int    64    0x80006DFC    
    dataRegAddr    unsigned int    1644167168    0x80006E00    
    addrRegAddr    unsigned int    1644167176    0x80006E04    
    cmdRegAddr    unsigned int    1644167184    0x80006E08    
    hNandCtrlInfo    struct _NAND_CTRL_INFO_ *    0x80006D54 {CtrlInit=0x800042C4,WaitPinStatusGet=0x80004294,hNandTimingInfo=0x80006E40,baseAddr=...    0x80006E0C    
        *(hNandCtrlInfo)    struct _NAND_CTRL_INFO_    {CtrlInit=0x800042C4,WaitPinStatusGet=0x80004294,hNandTimingInfo=0x80006E40,baseAddr=...    0x80006D54    
            CtrlInit    _NAND_STATUS_ (*)(_NAND_INFO_*)    0x800042C4    0x80006D54    
            WaitPinStatusGet    unsigned int (*)(_NAND_INFO_*)    0x80004294    0x80006D58    
            hNandTimingInfo    void *    0x80006E40    0x80006D5C    
            baseAddr    unsigned int    1744830464    0x80006D60    
            eccSupported    unsigned int    3    0x80006D64    
            waitPin    unsigned int    0    0x80006D68    
            waitPinPol    unsigned int    1    0x80006D6C    
            wpPinPol    unsigned int    0    0x80006D70    
            chipSelectBaseAddr    unsigned int[4]    [1644167168,0,0,0]    0x80006D74    
            chipSelectRegionSize    unsigned int[4]    [33554432,0,0,0]    0x80006D84    
            currChipSelect    int    1    0x80006D94    
    hNandEccInfo    struct _NAND_ECC_INFO_ *    0x80006E18 {baseAddr=0,eccOffSet=2048,eccByteCnt=16,ECCInit=0x80004458,ECCEnable=...    0x80006E10    
        *(hNandEccInfo)    struct _NAND_ECC_INFO_    {baseAddr=0,eccOffSet=2048,eccByteCnt=16,ECCInit=0x80004458,ECCEnable=0x800044AC...    0x80006E18    
            baseAddr    unsigned int    0    0x80006E18    
            eccOffSet    unsigned int    2048    0x80006E1C    
            eccByteCnt    unsigned int    16    0x80006E20    
            ECCInit    _NAND_STATUS_ (*)(_NAND_INFO_*)    0x80004458    0x80006E24    
            ECCEnable    void (*)(_NAND_INFO_*)    0x800044AC    0x80006E28    
            ECCDisable    void (*)(_NAND_INFO_*)    0x8000451C    0x80006E2C    
            ECCWriteSet    void (*)(_NAND_INFO_*)    0x8000452C    0x80006E30    
            ECCReadSet    void (*)(_NAND_INFO_*)    0x8000453C    0x80006E34    
            ECCCalculate    void (*)(_NAND_INFO_*,unsigned char*)    0x8000454C    0x80006E38    
            ECCCheckAndCorrect    _NAND_STATUS_ (*)(_NAND_INFO_*,unsigned char*,unsigned char*)    0x80004598    0x80006E3C    
    hNandDmaInfo    struct _NAND_DMA_INFO_ *    0x80006E5C {DMAInit=0x00000000,DMAXfer=0x00000000,DMAXferSetup=0x00000000,DMAXferStatusGet=...    0x80006E14    

  • Alwyn,

    Can you please specify your usecase. Have you erased the NAND before read/write? HAve you checked if the NAND page is in bad block or not?
    Are you trying to run the NAND read write example provided here:
    OMAPL138_StarterWare_1_10_03_03\examples\lcdkOMAPL138\nand

    The NAND Info structure read seems to populating the NAND geometry correctly. How did you write to the NAND? I would recommend erasing the NAND and writing to NAND using SFH utility before reading from the NAND. Details of using sfh utility with LCDK is provided here:

     

    Regards,

    Rahul

    PS: Please note that the NAND on the LCDKs is preflashed when it ships so you may need to erase the NAND before you write new data and read it.