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.

EMIFA ROM Fast boot with AIS

Other Parts Discussed in Thread: TMS320C6452

Hi,

I am working on the C6452 EVM from Lyrtech. I have managed to use genAIS to convert a small app into an AIS image and successfully executed it from flash using EMIFA direct boot option. This app was loaded by the boot ROM from flash into internal RAM.

Now, I want to do the same with a bigger application and load it into DDR2 RAM, which means in need to include a -cfg config.cfg to genAIS to setup the DDR2 before the boot ROM copies it from flash to DDR2 RAM.

From the document, 'Using the TMS320C6452 bootloader, SPRAAW2', the AIS SET command is in the following format:

0x58535907
<TYPE>
<ADDRESS>
<DATA>
<DELAY>

I have made a config.cfg file which looks like this:

/* setup PLL1 */
0x58535907
0x00000002
0x020E0110
0x0000001B
0x00000400

/* DDR2_SDCFG */
0x58535907
0x00000002
0x78000008
0x00530832
0x00000400

/* DDR2_SDRFC */
0x58535907
0x00000002
0x7800000C
0x0000081A
0x00000400

/* DDR2_TIM1 */
0x58535907
0x00000002
0x78000010
0x42DB5BD9
0x00000400

/* DDR2_TIM2 */
0x58535907
0x00000002
0x78000014
0x00A4C722
0x00000400

/* DDR2_DMCCTL */
0x58535907
0x00000002
0x780000E4
0x50006405
0x00000400

These settings are also reflect in my AIS file which i've copied to flash (0xA0000000), as shown next...

0x00000001    0x41504954
0x58535907    0x00000002
0x020E0110    0x0000001B
0x00000400    0x58535907
0x00000002    0x78000008
0x00530832    0x00000400
0x58535907    0x00000002
0x7800000C    0x0000081A
0x00000400    0x58535907
0x00000002    0x78000010
0x42DB5BD9    0x00000400 etc.

However, it seems as if these SET commands have not been successfully executed by the boot ROM because my DDR2 registers are still in their default state when i check them after board start-up...this causes my application not to run because DDR2 wasn't set up correctly before the boot ROM started to copy my app to DDR2 and jump to the entry point in DDR2 memory space...

Am I using the SET command correctly? (my boot ROM version is 3.70, BOOTCFG = 0x019D0004, BOOTCMPLT = 0x00000000)

Thanks.

  • Hi,

    I found what my problem was... in order to write DDR2_TIM1 and DDR2_TIM2 registers the TIMER_UNLOCK bit (bit15) in DDR2_SDCFG has to be 1. For more info refer to 'TMS320C6452 DDR2 memory controller, spuf85.pdf'. So basically my registers were 'write protected' and that's why the changes didn't reflect before as I expected it to.

    Here is the command line I used to generate the AIS image (it might help others):

    perl genAIS.pl -i app.out -o app -otype bin -bootmode emif -datawidth 16 -cfg config.cfg -crc 0

    perl 5.8.8 (activePerl) was used together with genAIS.pl (ver 1.20.00), it generated warnings (...element has non-unique value in ''name' key attribute...) which I've ignored...however, the AIS image still booted successfully using EMIFA direct boot.