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 EMIF FASTBOOT sequence.

I have some questions about the boot sequence on DM6437.

EVM is configured as:

FASTBOOT = 1

AEM[2:0] = 001b

BOOTMODE[3:0] = 0100b

Using SPRAAG0 doc sequence:

"... EMIF FASTBOOT sequence:

1. Programs the PLL using the PLL multiplier selected by the value of the AEM and PLLMS[2:0] pins as shown in Table 6.

2. Reads the value of the 8_16 pin as latched into the BOOTCFG register and sets the EMIF data width accordingly.

3. Fetches the AIS data from the external memory and processes the AIS commands until the JUMP_CLOSE command is encountered.

4. Branches to the application start address given in the JUMP CLOSE command. "

 

So I think the program will start at address 0x0010 0000 and sets the PLL and EMIF automatically.

After this, it starts to copy the sections to the space for each other was configurated.

Finishing it, starts the program at point _c_init().

If I configure the SECTIONS in the CACHE_L2, I think that the process will allocate the data in the CACHE_L2.

If I configure the SECTIONS in the DDR2 I think that the process will allocate the data in the DRR2.

But, for now, I need to configure the DDR2 before the process allocate the data in the DDR2.

So, my questions are:

1) On the program, Where I have to configure DDR2 access, before it starts to allocate the data?

2) Does the sequence above correct or I did something wrong?

 

  • Hi, someone can help me?

  • Hi Marcio,

    I see that you are using EMIFA boot with FASTBOOT enabled, but I am not 100% certain as to whether or not you are booting with AIS? The answer changes based on whether you are or are not.

    If you are not using AIS with your boot then the bootloader will immediately branch to 0x42000000 after initializing the PLL. At this point it will begin executing your bootloader code directly out of Flash. You, as the bootloader author, would need to make sure the DDR registers were properly configured before the bootloader copy loop begins copying anything to the external memory.

    If you are using AIS then the DDR can actually be configured through the FUNCTION_EXECUTE AIS op code. If you use the genAIS utilities provided with that app note and configure the DDR EMIF registers through the GUI the script will actually create these op codes for you. Then after the bootloader configures the PLL registers it will begin reading the AIS op codes from 0x42000000 rather than branching to that address. AIS allows you to leverage the on-chip ROM to boot your device rather than forcing you to write your own bootloader.

    I hope this answers your questions!

  • Hi Tim! Thanks for your answer

    Why the boot goes to 0x42000000 in both cases? Using my configuration and following the datasheet looks like that the program starts at 0x00100000 position? Am I wrong?

    I am using the hexAIS.exe to convert my .out file into .hex to flash burn. It means that I´m using AIS as you mentioned?

    Do you know any documentation that I can get more informations about AIS? Because I couldn´t find FUNCTION_EXECUTIVE AIS op code.

    And one more question: How I know thats DDR was configured before the bootloader allocate something into external memory?

    If you could send an application example of it, might help us a lot.

  • Marcio said:
    Why the boot goes to 0x42000000 in both cases? Using my configuration and following the datasheet looks like that the program starts at 0x00100000 position? Am I wrong?

    When performing an EMIFA ROM boot you have effectively 'told' the bootloader to go to EMIFA which is located at 0x42000000. Depending on whether or not you are using FASTBOOT (you are) and whether or not you are using AIS (you are) what exactly it does with that address changes as I mentioned in my previous post, but regardless that address is important to the boot.

    Marcio said:
    I am using the hexAIS.exe to convert my .out file into .hex to flash burn. It means that I´m using AIS as you mentioned?
    Yes, assuming you are booting with BOOTMODE[3:0] = 0100b. See Table 4 of the DM6437 Bootloader app note on page 7 for boot options.

    Marcio said:
    Do you know any documentation that I can get more informations about AIS? Because I couldn´t find FUNCTION_EXECUTIVE AIS op code.
    The Function Execute command is discussed in section 3.8 on page 28 of the same app note linked above. Keep in mind that you should not need to really know much about AIS op codes as the genAIS scripts should write all of this code for you.

    Marcio said:
    And one more question: How I know thats DDR was configured before the bootloader allocate something into external memory?
    If you are using AIS you can tell the on-chip ROM bootloader to configure DDR through the use of the Function Execute command as I mentioned before. Function Execute was written specifically for this type of purpose. Section 3.8.3 talks about this a little bit.

  • Hi Tim.

    "If you are using AIS you can tell the on-chip ROM bootloader to configure DDR through the use of the Function Execute command as I mentioned before".

    About it, just a little question: where is the correct location to type those configurations? Is it on .cmd ? or on gel?? Because I tried in both and any of them worked correct.

     

    Thanks

     

  • Hi

    In the SPRAAG0:

    "The function execute command allows execution of pre-defined functions that are present in the

    bootloader ROM code. For the DM643x, the following functions have been pre-defined to enable

    configurability of the PLL, DDR memory controller, and EMIFA, during the boot process"

    Where or how can I configure these functions??

    Thanks

     

  • These are AIS Op-Codes which would be implemented into your boot script if you used the genAIS.pl and genBootCfg.pl scripts. GenBootCfg.pl builds the boot-related AIS code (peripheral configuration, etc.) and genAIS.pl converts the contents of your .out file into AIS code. When using these together you get an AIS output file which can be burned into flash and read by the ROM bootloader at boot time.

  • Hi Tim!

    I just configurated some register in "GenBootCfg" and my program worked!

    Thanks for your help!

     

  • Marcio,

    I'm glad to hear it [:)]