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.

Linux/AM3356: NAND 16-bit bad block issue

Guru 20755 points

Part Number: AM3356

Tool/software: Linux

Hello,

We have issue with am335x as following:

On changing from nand 8 to nand 16, we get that all blocks are detected as "bad blocks"

I find the following page which suggest to make modification in oob when moving from nand 8 to nand 16

But I don't understand what exactly should be changed.

Maybe it is an issue of wrong gpmc timing ?

Can anyone assist on this ?

Best Regards,

Ran

  • Hi Ran,

    You mean you changed the NAND BCH mode from BCH8 to BCH16? This has nothing to do with NAND I/O width of 8-bit vs 16-bit. It has to do with how many bit errors at maximum can be corrected by the BCH algorithm. BCH8 can correct upto 8 bit errors in the 512 byte block. BCH16 can correct upto 16 bit errors in the 512byte block. However, BCH16 needs 26 ECC bytes per 512 bytes of data whereas we need only 14 ECC bytes for BCH8 per 512 bytes of data. Please see this documentation to check if your NAND device has enough spare bytes (OOB size) to store the ECC bytes for BCH16.
    lxr.free-electrons.com/.../gpmc-nand.txt

    regards,
    -roger

  • If you just changed nand-bus-width = <8>; to nand-bus-width = <16> you will also need to change gpmc,device-width from <1> to <2>. What is the NAND part you are using?