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.

nandlib omapl138

Other Parts Discussed in Thread: OMAPL138

I use OMAPL138, I use DSP only, I have got OMAPL138_StarterWare_1_10_03_03, now I have porblem in use nandflash.
the code as follow:
retVal = NANDBlockErase(&nandInfo, blkNum);
this is from nandflash lib, but it return 9, I donot kwow what it mean.
the return values in nandlib.h as follow:
typedef enum _NAND_STATUS_
{
    NAND_STATUS_PASSED                          =  (0x001),
    NAND_STATUS_FAILED                          =  (0x002),
    NAND_STATUS_NOT_FOUND                       =  (0x004),   
    NAND_STATUS_DEVBUSY                         =  (0x008),
    NAND_STATUS_DEVWRPROTECT                    =  (0x010),
    NAND_STATUS_WAITTIMEOUT                     =  (0x020),
    NAND_STATUS_READWRITE_DMA_FAIL              =  (0x040),
    NAND_STATUS_ECC_UNSUPPORTED                 =  (0x080),
    NAND_STATUS_READ_ECC_ERROR_CORRECTED        =  (0x100),
    NAND_STATUS_READ_ECC_UNCORRECTABLE_ERROR    =  (0x200)
}
NandStatus_t;

the nandflash I used is K9F4G08U0B.
Why?

  • Hi Lisong Xu,

    Sorry for the delayed reply.

    9 indicates nand device is busy.

    When you analyse NANDBlockErase function which in turn testing status of nand by using function called

    NANDDeviceStatusGet.

    There it is initialised to,

    retval = NAND_STATUS_PASSED; //NAND_STATUS_PASSED   =  (0x001)

    If the device is not ready, Look at the below OR operation

    if(!(nandStatus & NAND_CMD_STATUS_DEVREADY_MASK))
    {
     retVal |= NAND_STATUS_DEVBUSY;
     }