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.

Questions about dm6437 NOR ROM bootloader

Dear Sir,
I am trying to boot my DM6437 in EMIFA ROM Fast Boot mode.
It boots fine, when all SECTIONS are mapped into L2RAM.
The C code were as follows:
...
...
void main( void )
{
    //EVMDM6437_init( );
    OnTargetConnect();
    EVMDM6437_I2C_GPIO_init( );
    led_test( );
}
...
...
void OnTargetConnect()
{
    Setup_Cache( );
    Setup_Pin_Mux( );               // Setup Pin Mux
    Setup_Psc_All_On( );            // Setup Power Domains
    Setup_PLL0_594_MHz_OscIn( );    // Setup Pll1 [DSP @ 594 MHz][Core 1.20V]
  //Setup_PLL0_459_MHz_OscIn( );    // Setup Pll1 [DSP @ 459 MHz][Core 1.05V]
                                  
  //Setup_PLL1_DDR_108_MHz_OscIn( );
  //Setup_PLL1_DDR_121_5_MHz_OscIn();
  //Setup_PLL1_DDR_135_MHz_OscIn();

    Setup_Aemif_8Bit_Bus( );        // Setup Async-EMIF [8-bit bus]
  //Setup_PLL1_DDR_148_5_MHz_OscIn( );
    Setup_PLL1_DDR_162_MHz_OscIn( );// Setup Pll2 [VPSS @ 54 MHz, DDR @ 162 MHz]
   
    //GEL_TextOut( "\nStartup Complete.\n\n" );
}
...

The linker commands for the project were as follows:
MEMORY
{
    VECS:       o = 0x10800000  l = 0x00000200
    BOOT:       o = 0x10800200  l = 0x00000200
    IRAM:       o = 0x10800400  l = 0x0001FA00
    DDR2:       o = 0x80000000  l = 0x08000000
}

SECTIONS
{
    .bss        >   IRAM
    .cinit      >   IRAM
    .cio        >   IRAM
    .const      >   IRAM
    .data       >   IRAM
    .far        >   IRAM
    .stack      >   IRAM
    .switch     >   IRAM
    .sysmem     >   IRAM
    .text       >   IRAM
    .ddr2       >   DDR2
}

When all SECTIONS were mapped into DDR2, it CAN NOT boot successfully!
The linker commands for the project were as follows:
MEMORY
{
    VECS:       o = 0x10800000  l = 0x00000200
    BOOT:       o = 0x10800200  l = 0x00000200
    IRAM:       o = 0x10800400  l = 0x0001FA00
    DDR2:       o = 0x80000000  l = 0x08000000
}

SECTIONS
{
    .bss        >   DDR2
    .cinit      >   DDR2
    .cio        >   DDR2
    .const      >   DDR2
    .data       >   DDR2
    .far        >   DDR2
    .stack      >   DDR2
    .switch     >   DDR2
    .sysmem     >   DDR2
    .text       >   DDR2
    .ddr2       >   DDR2
}

I don't know what's the problem, could you do me favor and give me some suggestions?

Thanks !

  • Hi, is there any log/error messages? I want to send those to our experts.

    Have you tried accessing DDR and see if it is initalized properly?

  • Paul.Yin said:

    Hi, is there any log/error messages? I want to send those to our experts.

    Have you tried accessing DDR and see if it is initalized properly?

    It's very kind of you to help me.
    Maybe I did not describe the question clearly.

    First, I builded the project which was shown above(all SECTIONS were mapped into IRAM), and the CCS generated .out files. I loaded the file into DM6437 with XDS560plus, and the program run fine.
    Second, I used the hexAIS utility(hexAIS.exe) to convert .out files to flash bootable .hex files with success. Then, I used the Flashburn DSK utility(v3.11) to burn the .hex files into NOR FLASH ROM.
    At last, I disconnected the XDS560plus with the DM6437 board, and resetted the DM6437, It can boot successfully!

    When all SECTIONS were mapped into DDR2, I did by the same steps, the DM6437 CAN NOT boot successfully!
    The routine is very simple, and do not have any error messages. I am curious where is the problem?

    Could anyone help me?


    Thanks!

  • If you are trying to boot load the device with code that has been linked to run from DDR2, then the DDR2 must be initialized before loading anything there. To accomplish this, the DM6437 device does have the capability, using particular AIS commands, to initialize the DDR2 interface. If you do this, then the DDR will be initialized so any code or data that the ROM boot loader tries to load to DDR will successfully be placed there, and then jumping into that code at the end of the boot process will also succeed.

    You can look at the DM643x.ini file that comes along with the HexAIS.exe tool to see how you can initialize the DDR as part of the AIS image.  This is briefly mentioned in this document.

    Regards, Daniel

  • Thank you for your consideration!

    I have read the documents "DM643x Flashing Instructions" and "Using the TMS320DM643x Bootloader(spraag0d)" carefully, and operated according to the instructions of  "DM643x Flashing Instructions" step by step,  but when all the code and data were mapped into DDR2, the DM6437 board CANNOT boot successfully. Maybe DDR were not inilized approprately.

    I viewed the FLASH ROM memory, and stored the data in a file(led_ddr2.dat), which is displayed below.

     

    Could you tell me whether DDR were inintialized approprately?

    Best Regards.

    Michael Lee.

     

     

  • Dear Sir,

    I look at the DM643x.ini file , and find that BootMode is set as UART (BootMode=uart), is it ok for my DM6437 system? or is it necessary for me to modify the DM643x.ini file to initialize the DDR ?

    How Can I do?

    Best Regards, Michael Lee

  • Michael,

    My DM643x ini file has the same line as yours, and my system boots correctly.  You should basically take the values from your gel file init of DDR2 and plop them into the DM643x.ini file, with one very important exception.  The SDBCR register has to have the unlock bit set for the AIS init to work.  Here is the DDR section from my file, obviously you need to substitute your own values for the timing registers.

    ; The DDR section allows setting the DDR clock rates (PLL2) and
    ; the needed values for the DDR control registers.  Only the 9
    ; parameters shown below can be set via the AIS method.
    [DDR]
    DDRPLLM = 25
    DDRCLKDIV = 1
    VPFECLKDIV = 11
    CLK_SRC = 0
    DDRPHYCR = 0x50006404
    ;SDBCR = 0x00130832    Must set unlock bit, not the same as GEL file value, use line below for correct operation
    SDBCR = 0x00138832
    SDTIMR = 0x28923209
    SDTIMR2 = 0x0016C7E2
    SDRCR = 0x000004F3

  • I second Matt's recommendation.  If that doesn't work, I would double check your timings.

    Regards, Daniel

  • Dear MattLipsey,

    Thank you very much for your suggestions!

    I followed your recommendations, and the DM6437 system boots succesfully !

    Best Regards,

    Michael Lee