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.

C6748 Development Kit (LCDK), NAND question, Bad Block marks

Other Parts Discussed in Thread: OMAP-L138

Good afternoon!

As short description:

- the dev board is LCDK

- C6748_StarterWare_1_20_04_01

-compiling example - /C6748_StarterWare_1_20_04_01/examples/lcdkC6748/nand

Lets look at example output

************* StarterWare NAND Application ************
 ****************** NAND DEVICE INFO ******************
    MANUFACTURER ID    : 0x2C
    DEVICE ID          : 0xCC
    PAGESIZE           : 2048 Bytes
    BLK SIZE           : 131072 Bytes
    PAGES PER BLOCK    : 64
 ******************************************************

Please Enter The Block Number(0 - 4095) 10
Please Enter The Page Start Page Number(0 - 63) 0
 Please Enter The Number Of Pages To Write 1
 Erasing The Block 10                         : Succeeded.
 Writing To Page 0 Of Block 10                : Succeeded.
 Reading From Page 0 Of Block 10              : Succeeded./S-S/ /T-T/ /A-A/ /R-R/ /T-T/ /E-E/ /R-R/ /W-W/ /A-A/ /R-R/ /E-E/
 NAND Data Integrity Test                    : Passed
 ******************************************************
 Block Is Bad, Can't Continue ...!!!

A little modification at the end of this file by adding one more check for bad blocks

retVal = NANDBadBlockCheck ( &nandInfo, blkNum );

UARTprintf("NANDBadBlockCheck(). rc=%01d",retVal);
          if ( retVal == NAND_BLOCK_BAD )
            {
              UARTPuts ( "\r\n Block Is Bad, Can't Continue ...!!! ",-1 );
              while ( 1 );
            }

If the application writes any data from page 2 to 62, everything is good.

The question is, when any data writes to any blocks at page 0 or 1 entire block becomes bad, so why it happens and how to fix it?

Thanks in advance!

WBR,

Dmitriy.

  • Hi Dmitriy,
    You can't use the block 0 since its assured good block in all the time.
  • Hello Shankari!

    Thanks for your response.

    In the block 0 probably located ubl so lets exclude block 0 from this discussion.

    The bad block mark appears when application writes data to page 0 or page 1 of any block.
    Lets take a block 10 as its presented in a log of StarterWare example output.
    Could You recompile and upload this example and add one extra check NANDBadBlockCheck ( &nandInfo, blkNum ) after write operation.


    P.S For read write operations we use nandlib provided by StarterWare package.

    Regards,
    Dmitriy
  • Hi Dimitriy,

    Your observation is right. Let me explain the reason.

    In this example, actually, the first , second and last page of each block is used as spare area to store the ECC value for Data integrity.

    For the very first time when we give the inputs as "11 - Block NO" , "0 - page number " and "1 - Num of pages ", it will get passed successfully. When it is successfull, it erases the spare area data as well.

    For the next time, when you input the same, 11 - Block NO" , "0 - page number " and "1 - Num of pages ", it will get failed. Because it will first check and read the ECC data from the spare area. As the datas are altered, it will mark the block as bad and throw error.

    I hope this helps.

    Just to demonstrate the "read", "write " and spare area, data integrity e.t.c., they have used like this, You please go-ahead and modify as per your requirement.

    As well please refer to the NAND writer project for more clear cut code.
  • Looks like using of that nandlib.lib not a right choice to write any binary code to NAND, right?
  • Dimitriy said:

    Looks like using of that nandlib.lib not a right choice to write any binary code to NAND, right?


    For writing binary into the NAND memory, one should use the NAND writer project.

    Please download the OMAP-L138_FlashAndBootUtils_2.40" from the wiki below and the project is located at
    ~\ti\OMAP-L138_FlashAndBootUtils_2.40\OMAP-L138\CCS\NANDWriter

    Download linki: sourceforge.net/.../
  • Yep, thanks. We have it.

    Thank You