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.

X-loader bad block management

Other Parts Discussed in Thread: AM3517

I have recently acquired a Logic PD Zoom AM3517 EVM that comes preloaded with x-loader, u-boot, linux, and some demos in the Micron NAND flash.  The x-loader appears to assume that u-boot is located at located at 0x80000, immediately after the 4 blocks reserved for boot.  Does the x-loader handle the situation where 0x80000 (or any subsequent u-boot blocks) is a bad block?  I asked Logic PD support and they recommended that I ask here, as the x-loader was built by TI.  Thanks.

  • Andrew:

    X-loader has the following code for loading U-Boot from NAND:

     if (get_mem_type() == GPMC_NAND){
          for (i = NAND_UBOOT_START; i < NAND_UBOOT_END; i+= NAND_BLOCK_SIZE){
              if (!nand_read_block(buf, i))
                  buf += NAND_BLOCK_SIZE; /* advance buf ptr */
          }

    For OMAP3 and AM35x EVMs these constants are:

    #define NAND_UBOOT_START 0x80000

    #define NAND_BLOCK_SIZE 0x20000

    #define NAND_UBOOT_END 0x240000

    When UBOOT is programmed into NAND bad blocks are skipped. 

    When UBOOT is read from NAND the bad blocks are also skipped.

    Once UBOOT is in RAM it is all in one contiguous area.

    Regards,

    Michael T

    PS: Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

     

  • This would appear to handle factory bad blocks well, but what happens if a product containing UBOOT is shipped and at some point one of the blocks containing UBOOT goes bad?  The product would no longer boot and there does not appear to be a way to recover.  Am I missing something?  Is this a big enough concern that it is unwise to ship a consumer product using this methodology?  Thanks.

  • Andrew:

    ROM boot loader allows redundancy for x-loader.  You can program x-loader four times into the first four blocks of NAND and it

    will try each one until it boots successfully.   Doing the same for uboot would require adding that capability to x-loader.

    In our latest software, there is the option of using alternate rigorous error correction and detection schemes that are able

    to handle more bit errors and reduce the probability of blocks going bad. 

    See this wiki page for how to use the different ECC schemes.  This applies to AM35x/AM37x/OMAP35x devices.

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

    Regards,

    Michael T

    PS: Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

  • The Error Correction User Guide specifically refers to distribution  PSP 03.00.01.06.  I was working with 03.00.00.02 so I downloaded the update.  I cannot see how ECC is any different between the two distributions.  Specifically, ecc.c in the ....src/boot-strap/xloader-03.XX.XX.XX/lib directory is exactly the same.  I can find no use of the compilation flags andywhere (eg.  -DEIGHT_BIT_ERROR_CORRECT) anywhere in the x-load code.  What am I missing?  Thanks.

  • Andrew:

    If you download the AM3517 SDK you will get PSP software that includes the new ECC functionality.

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/sdk/AM3517/latest/index_FDS.html

    Regards,

    Michael T