AM3359 NAND boot ECC settings in StarterWare

Hi!

I have a BeagleBone and an expander board with a NAND flash (1 Gb size, 8 bit bus width, 2048 byte page size, 128kB block size).

I am using the StarterWare software library. I have managed to boot up the device from the NAND flash with my own code if the ROM ECC option is disabled (SYSBOOT 9 pin is high). If this pin is tied to low, the processor won't start from NAND with the same code in the flash.

It seems the ECC setting are not correct. In the Reference Manual Page 4563 Figure 26-15. shows the ECC layout used by the ROM code during boot sequence. How can I set in the StarterWare drivers to generate the same ECC code (BCH-8) and to use this layout?

Best Regards,
Balazs

  • Hi Balazs,

     I hope you are using NAND library as in evmAM335x NAND example application and bootloader.

    You can assign following values to the eccType and eccOffSet of NANDDevInfo structure to use the layout you have specified.

        

            nandDevInfo->eccType       = NAND_ECC_ALGO_BCH_8BIT;

            nandDevInfo->eccOffSet     = NAND_ECC_BCH_8BIT_OOB_OFFSET;       /* #defined to 2050 */

     

    Also, NAND flash writer source code is available in /tools/flash_writer/src/nand-flash-writer_AM335x/. However, this doesn’t use NAND library.

           

    Regards,

    Vishwanath K