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.

DM355 UBOOT ECC issue

Hello,

I am using DM355 with a small page size NAND. I got UBL and UBOOT working but when I flash kernel using the u-boot commands, I get ECC errors while reading back the same.

So while flashing it will show me that kernel is flashed but while booting it fails to load kernel . If I try to read back using the u-boot commands then it gives me ECC errors.

Does anybody have faced similar issue? Please help me if anybody has some solution for this issue.

regards,

Ketan

  • The issue is when we build the uboot v1.2.0 with dm355 default config, the NAND ECC functions are initialized for NAND_ECC_HW10_512.

    Setting the NAND ecc config to NAND_ECC_HW3_512 resolves the issue. It can be done in board_nand_init() of dm355_evm\nand.c.

     

    Regards,

    Snehal

  • Hello Ketan,

    Could you please show me how to flash ubl and uboot into the NAND with small page block size? Used serial flashing utility provided TI or CCS? Could you please tell me the type of your nand with small block size? Thanks a lot.

     

    Best Regards,

    YHL

  • Ketan,

    When I burned ubl and uboot on nand flash with small block size (hynix 64MB) using DM35x_FlashAndBootUtils_1_50 through serial port, I got error message "No good blocks in allowed range". But I used a new nand flash. Please give me some recommendations? Thanks a lot.

    Best Regards,

    YHL

  • Seems like you have got bad blocks in initial pages of your nand so it is not able to write the descriptor table information.

    Try erasing flash completely so that your bad block table will be clear.

    I have checked UBL and UBOOT flashing with both the serial utility and with CCS. I too had one bad nand where I was getting similar kind of errors. I would suggest first try with CCS and confirm that it is all about bad blocks as you can debug the code on CCS. If it is all about bad blocks then try erasing flash completely so that your bad block descriptor table in NAND will be clear.

    Hope that should work or try on any other device to confirm that NAND has some issue.

    regards,

    Ketan

  • Thanks for your kind help. I will try to do this. Thanks again.

    Best Regards,

    YHL

  • Ketan,

    I used command "sfh_DM35x.exe -nanderase" through serial flashing utility to erase flash completely, am i right?  Thanks.

    Best Regards,

    YHL

  • Not sure as I used a SD boot utility to do that low level erase operation which is also available on TI's website.

    Do you have any other device to try NAND flashing or you have only one device?

    If you have other then try first doing on that.

    Let me check back exactly what I did with my device which was also behaving similarly as yours and I will update you on this post.

    regards,

    Ketan

  • Ketan,

    Thanks very much. Waiting good news from you. I will try other new nand device.

    Best Regards,

    YHL

  •  Ketan,

    I just tried a new nand flash, but i still got the error messages in the following:

    "

    Waiting for DONE...
    DONE received.  All bytes of image data received...
            Target: Writing UBL to NAND flash
            Target: Unprotecting blocks 0x00000001 through 0x00000018.
            Target: Number of blocks needed for header and data: 0x0x00000001
            Target: NAND block 0x00000001 is bad!!!
            Target: NAND block 0x00000002 is bad!!!
            Target: NAND block 0x00000003 is bad!!!
            Target: NAND block 0x00000004 is bad!!!
            Target: NAND block 0x00000005 is bad!!!
            Target: NAND block 0x00000006 is bad!!!
            Target: NAND block 0x00000007 is bad!!!
            Target: NAND block 0x00000008 is bad!!!
            Target: NAND block 0x00000009 is bad!!!
            Target: NAND block 0x0000000A is bad!!!
            Target: NAND block 0x0000000B is bad!!!
            Target: NAND block 0x0000000C is bad!!!
            Target: NAND block 0x0000000D is bad!!!
            Target: NAND block 0x0000000E is bad!!!
            Target: NAND block 0x0000000F is bad!!!
            Target: NAND block 0x00000010 is bad!!!
            Target: NAND block 0x00000011 is bad!!!
            Target: NAND block 0x00000012 is bad!!!
            Target: NAND block 0x00000013 is bad!!!
            Target: NAND block 0x00000014 is bad!!!
            Target: NAND block 0x00000015 is bad!!!
            Target: NAND block 0x00000016 is bad!!!
            Target: NAND block 0x00000017 is bad!!!
            Target: NAND block 0x00000018 is bad!!!
            Target: No good blocks in allowed range!!!
            Target: Writing failed!Starting UART Boot...
            Target: BOOTUBL
    "

    Please help me. Thanks a lot.

    Regards,

    YHL

  • Check the "board_nand_init" function in nand.c. This sets the funtions used for nand ECC operations.
    By default the code sets the functions for EVM. You may need to modifiy it if you are using a different nand device.

    Ours is a Small page nand(Page Size : 512 + 16 Bytes, Block Size : 16K), we did following
    modifications in "board_nand_init":

    nand->options        = NAND_USE_FLASH_BBT;
    nand->eccmode        = NAND_ECC_HW3_512; // ECC options are available in 'include/linux/mtd/nand.h'
    nand->calculate_ecc  =  nand_dm355evm_calculate_ecc;
    nand->correct_data   = nand_dm355evm_correct_data;
    nand->enable_hwecc   = nand_dm355evm_enable_hwecc;

  • Hello Snehal Parmar,

    When I burned ubl and uboot on nand flash with small block size (Page size : 512 + 16 Bytes, Block size : 16K) using DM35x_FlashAndBootUtils_1_50 through serial port and I used a new nand flash. I got the error messages in the following:

    " Waiting for DONE... DONE received. All bytes of image data received... Target:

    Writing UBL to NAND flash Target:

    Unprotecting blocks 0x00000001 through 0x00000018.

    Target: Number of blocks needed for header and data: 0x0x00000001

    Target: NAND block 0x00000001 is bad!!!

    Target: NAND block 0x00000002 is bad!!!

    Target: NAND block 0x00000003 is bad!!!

    Target: NAND block 0x00000004 is bad!!!

    Target: NAND block 0x00000005 is bad!!!

    Target: NAND block 0x00000006 is bad!!!

    Target: NAND block 0x00000007 is bad!!!

    Target: NAND block 0x00000008 is bad!!!

    Target: NAND block 0x00000009 is bad!!!

    Target: NAND block 0x0000000A is bad!!!

    Target: NAND block 0x0000000B is bad!!!

    Target: NAND block 0x0000000C is bad!!!

    Target: NAND block 0x0000000D is bad!!!

    Target: NAND block 0x0000000E is bad!!!

    Target: NAND block 0x0000000F is bad!!!

    Target: NAND block 0x00000010 is bad!!!

    Target: NAND block 0x00000011 is bad!!!

    Target: NAND block 0x00000012 is bad!!!

    Target: NAND block 0x00000013 is bad!!!

    Target: NAND block 0x00000014 is bad!!!

    Target: NAND block 0x00000015 is bad!!!

    Target: NAND block 0x00000016 is bad!!!

    Target: NAND block 0x00000017 is bad!!!

    Target: NAND block 0x00000018 is bad!!!

    Target: No good blocks in allowed range!!!

    Could you please tell me how to flash ubl and uboot into your nand flash with small block? Please give me some recommendations?

    Thanks and Regards,

    YHL

  •  

    The messages show that all the blocks are bad. Which looks highly unlikely.

    Try erasing the nand(can use 'sfh_DM35x.exe -nanderase').

    Then try flashing ubl and uboot again.

     

    If you face the same issue then use CCS to open the nand writer project (within FlashAndBootUtils package) and see what is going on.

  • I still faced the same issue using CCS (nandwriter). Could you please tell me what version did you use to flash ubl & uboot on nand flash with small block size for serial flashing utility? Thanks in advance.

    Regards,

    YHL