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.

TMS320C6424: Lack of complete documentation to implement NAND Boot

Part Number: TMS320C6424

Dear Ti Support,

life is not perfect and I have to implement a new board using TMS320C6424.

I have spend quite a time digging into manuals. Though there were several errors and inconsistency in the docs I almost solved my issue.

So far I fail to boot this device from NAND Flash. NAND is connected on CS2, FPGA connected on CS3. I use FPGA (Signal Tap) to monitor status of the NAND bus. Following works:

1. NAND programming/reading using SoC's ECC calculation and check

2. NAND read by TMS320C6424 boot rom

I can see that my AIS is read properly at SIgnal Tap. So I am confident that Flash get recognized by the boot rom, proper page and block sizes are used. But nothing happens and boot rom keeps reading next.

It guess that either my AIS is incorrect or page read fails ECC check. Both are not documented completely.

1. What NAND's spare area layout should I use? I found a few examples for old DM6x DSPs and implemented in same way. No clue whether it is correct.

2. NAND's AIS there are 3 fields after Magic Number, that are not completely documented:

I checked genAIS.pl script without luck. I have a block size of 0x40 pages. If my sample AIS fits into single page and is programmed into 1-st block, than I should use here 0x1, 0x1, 0x0? Or maybe 0x1, 0x1, 0x40?

Anyway, since ROM code can be debugged I end up digging into disassembly. Looks like code is compiled without optimization. Though it is going to be quite time consuming I guess I can solve my issues by debugging ROM code.

I guess you are not going to update C6424 documentation, so maybe you can share source code for the boot rom? It could save my time. We plan to do PCI boot also and I suspect I am going to face more issues with this DPS.

  • Hi,

    so maybe you can share source code for the boot rom?

    Let me check about that. In general ROM code is not publicly available, it is programmed in the factory and is used as is (no debug options).

    Are you by any chance using a device older than rev. 1.30? Consider the following note in the ROM Bootloader App Note (www.ti.com/.../spraak5b.pdf) :
    NAND flash boot is fully supported on Rev1.30 of the device. For Rev1.0 and Rev1.20, this boot mode was supported through secondary boot only. On Rev1.30 of the device, the bootloader supports boot using AIS image script stored in NAND starting at Block1 or above.

    Best Regards,
    Yordan
  • Hello Yordan,

    looks like I have boot rom version 1.40. Check out a screen shot:

  • Hi,

    I believe this note refers to actual chip silicone revision. See Figure 2-14. Device Nomenclature in the TMS320C6424 datasheet:
    www.ti.com/.../tms320c6424.pdf

    Best Regards,
    Yordan
  • Hi,

    > (no debug options)

    well, I guess that boot rom is build with optimization disabled. Check out following assembler lines from the boot rom:

    Very same constant has been calculated 2 times in row and put into A4 at lines 0x00100394 and 0x001003a8. This code looks for me like

    if (fnc_ptr) {
        fnc_ptr();
    }
    

    where calculated constant is fnc_ptr address. I would expected this to be optimized into a single const calculation instead for C code. Not sure this guess is correct though.

    Regards,

    Kirill

  • > I believe this note refers to actual chip silicone revision.

    Indeed. According to Table 3 at silicon errata this should be rev 1.3: www.ti.com/.../sprz252d.pdf
  • Kirill,

    Is this a new C6424 based design or are you running into this issue on an existing design? As you can see on ti.com, the part that you are using is NRND where we continue to provide support for existing designs but due to limited expertise around these older DSP parts don`t recommend them for a new design
    www.ti.com/.../TMS320C6424

    We unfortunately don`t share the boot ROM source for this device due to IP concerns. C6424 uses the same ROM as DM6437 device so all resource for NAND boot for DM6437 also applies to the device that you are using.
    processors.wiki.ti.com/.../NAND_BOOT_on_DM6437
    e2e.ti.com/.../46783
    processors.wiki.ti.com/.../Determining_compatibility_between_ROM_Bootloader_(RBL)_and_Raw_NAND_devices

    I will check to see if I can provide NAND ECC layout to you based on the ROM source.

    Regards,
    Rahul
  • Dear Rahul Prabhu,

    > Is this a new C6424 based design or are you running into this issue on an existing design?

    As I said already this is a new design. I have selected the DSP because of PCI bus with master mode present. I hope you can still answer a few more questions though. Otherwise I will have to dig into ROM code assembly...

    > but due to limited expertise around these older DSP parts

    I completely understand your reasons for this. This is why I suggested sharing ROM code.

    > C6424 uses the same ROM as DM6437 device

    This is very valuable information. Thank you!

    Searching internet for open information about programming NAND on these old TI DSP I came across this https://github.com/virt2real/dm36x-flash-utils/blob/master/DM643x/Common/src/device_nand.c

    1. "Large" (see source code) page flash: I have 2048 B per page flash

    For these assumptions I got following:

    1. All AIS is written in little endian bytes order to NAND
    2. All NAND related meta data is written in little endian bytes order except ECC
    3. Separate ECC value per 512 Bytes, 4 ECC values for 2KB page
    4. AIS number of pages: actual number of pages (AIS image / 2KB for me)
    5. AIS block start: actual start block (block 0 is not allowed in ROM code)
    6. AIS page start: always zero

    Check out my spare area layout that worked for me:

    #define TI_BAD_BLOCK_MARK	(0xBADDBADD)
    
    // Make sure you have 4 bytes align here
    struct nand_ti_ecc {
    	uint32_t onfi_meta; // See ONFI spec on Bad block identification
    	uint32_t ti_bad_block_mark;
    	uint32_t ti_ecc; // Bytes are swapped here regardless of endianess!
    	uint32_t reserved;
    };
    
    // Spare area layout for 2048 Bytes page
    struct nand_ti_ecc ti_spare_area[4];
    

  • Rahul,

    > I will check to see if I can provide NAND ECC layout to you based on the ROM source.

    since you came to checking boot ROM source could please answer another question about AIS section fill command? I have created a separate thread: e2e.ti.com/.../801724

    Regards,
    Kirill