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.

TMS320C6743: NAND Boot

Part Number: TMS320C6743
Other Parts Discussed in Thread: OMAP-L137

Hi, I am trying to get setup for a standalone boot. I have a NAND 8 bit flash on EMIFA CS3 (device ID 0xDA). I have compiled the serial flashing / AIS tools successfully, and can now successfully erase / program the flash device (confirmed by reading back with some code loaded by XDS110).

I find that if the flash device is just erased then upon booting I get the bootrom error status "Peripheral open failed".

But when programming my AIS image then I get the bootrom status "Invalid AIS keyword".

This implies to me that I am definitely programming the image to the correct location, and that the bootrom is fetching AIS from the correct device etc.

I can see the AIS commands in the generated file, and they seem to be sensible according to the bootrom documentation (sprab04g).

I have tried stripping down my AIS .ini file such that there are no other AIS commands than just section load, but I still get the "Invalid AIS keyword" error.

Can this be some sort of endian issue?

What would be the next step with trying to debug what the bootrom is actually fetching? I can see the stack contents when the bootrom comes to a halt. Will it have fetched a chunk of data from flash to the stack somewhere?

I am using OMAP-L137_FlashAndBootUtils_2_40

Many thanks,

James

  • Update:

    I have now found the beginning of the AIS contents in internal RAM at 0x00F01000. In the Memory browser it starts with:

    00000020 41504954 58535901 C053F0F8 00000008 C0572580 C056C740 58535901 C053F100 0003E220 1078D810
    07FEE053 4646B407 028088FE

    Is this the correct endianness by the time it gets here?

  • James,

    I agree with your evaluation based on the Boot ROM status that the image is flashed to the NAND and at the right location. Can you please open the boot binary in a hex editor and check if the data in the memory browser matches with the boot image. The endian seems fine to me as 0x58535901 is a valid AIS command and the magic word also appears to be correct but I am not sure what the leading 0x00000020 value indicates in the memory browser where NAND page is loaded

    Can you also share the full log of the Debug GEL file from which you are getting the ROM status

    Regards,

    Rahul

  • Hi Rahul,

    I had actually been suspecting that initial 0x00000020. I found in the AISgen code where it adds that "AIS preamble" for the case of EMIFA 8 bit boot.

    I tried experimentally removing it by setting ini file to be not EMIFA, and it now works!!!

    It seems that this is a gotcha as although I am booting from EMIFA, I must not tell the ini file that I am booting from EMIFA!

    Many thanks,

    James

  • Thanks for confirming the fix James. Are you saying that even when you select NAND 8 bit boot in the tool, the tool generates the leading preamble or did you select NOR boot?

     

  • I actually never found any GUI tool for doing the AIS generation. I am using a command line tool and .ini file to generate AIS.

    <snip>

    ; General settings that can be overwritten in the host code
    ; that calls the AISGen library.
    [General]

    ; Can be 8 or 16 - used in emifa
    busWidth=8

    ; EMIFA,NONE
    ; EMIFA required for NOR boot modes, along with busWidth field
    BootMode=NONE

    </snip>

    I was originally setting BootMode=EMIFA, as that is what I am booting from. The comment states that it is important for NOR, but doesn't forbid it for NAND. In the code, it adds the preamble like this:

    <snip>

    case AisBootModes.EMIFA:
    {
    if (this.busWidth == 16)
    {
    this.writer.Write((UInt32)(0x1 << 0)|(0x2 << 4));
    }
    else
    {
    this.writer.Write((UInt32)(0x0 << 0)|(0x2 << 4));
    }
    this.writer.Write((UInt32)AisOps.MagicNumber);
    break;

    </snip>

  • The AIS GUI tool is provided with the Bootloader application notes as part of associated file referred to in summary:

    http://www.ti.com/lit/an/sprabb1c/sprabb1c.pdf