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.

nand SW ecc

Guru 20755 points

Hi,

in http://processors.wiki.ti.com/index.php/DM814x_AM387x_PSP_U-Boot#Flashing_images_to_NAND_in_SD_boot 
it says "

sw - Set software ECC for NAND
hw <hw_type> - Set hardware ECC for NAND
<hw_type> - 0 for Hamming code
1 for bch4
2 for bch8
3 for bch16
Currently we support only Software, Hamming Code and BCH8. We do not support BCH4 and BCH16
"
But in the example below it shows using nandecc hw

TI8148_EVM# nand erase 0x0 0x20000
TI8148_EVM# nandecc hw 2
TI8148_EVM# nand write.i 0x81000000 0x0 0x20000
TI8148_EVM# nandecc hw 0

So, is nandecc hw suported ?

Thanks,
Ran

  • Ran,

    Ran S. said:
    So, is nandecc hw suported ?

    It depends on which "nandecc hw" is considered to be used.

    "nandecc hw" can be:

    TI8148_EVM#nandecc hw 0 - this is HW ECC Hamming Code, this is supported

    TI8148_EVM#nandecc hw 1 - this is HW ECC BCH4, this is not supported, but see the below e2e:

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/447/t/349230.aspx

    TI8148_EVM#nandecc hw 2 - this is HW ECC BCH8, this is supported

    TI8148_EVM#nandecc hw 3 - this is HW ECC BCH16, this is not supported

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_UBOOT_User_Guide

    NAND ECC algorithm selection

    NAND flash memory, although cheap, suffers from problems like bit flipping which lead to data corruption. However by making use of some error correction coding (ECC) techniques it is possible to workaround this problem.

    For the data stored in NAND flash, U-Boot supports following NAND ECC schemes

    1. S/W ECC (Hamming code)
    2. H/W ECC (Hamming code, BCH4, BCH8, BCH16)

    NOTE: Current releases do not support BCH4 and BCH16.

    ECC Schemes and their context of usage
    ECC typeUsage
    S/W ECC Not used
    H/W ECC - Hamming Code Not used by default. Switch back to this only if using JFFS2 file system.
    H/W ECC – BCH8 Used by default to flash any image from the Uboot. Environment variables are also stored in this ECC scheme.

    To select ECC algorithm for NAND:

    TI8168_EVM# nandecc [sw | hw <hw_type>] 

    Usage:

       sw - Set software ECC for NAND
    hw <hw_type> - Set hardware ECC for NAND
     <hw_type> - 0 for Hamming code
                 1 for bch4
                 2 for bch8
                 3 for bch16
    Currently we support only Software, Hamming Code and BCH8. We do not support BCH4 and BCH16
    

    Best Regards,
    Pavel