Forums

Execution speed problem of DSK5509

Started by hsu0...@yahoo.com.tw December 15, 2006
Hi all,

I have a problem of Spectrum digital DSK5509 bootloader. It begins that I turned a .out file into a .hex file and downloaded the .hex into flash memory, but the execution speed of the program becomes obviously slow than using CCS, not using flashburn to burn the program into memory, for debugging.
I searched TI documents and guessed that it is because accessing flash rom is more slowly than saram. Is that so? And if it is, does there has any solution to let the execution speed becomes the same as using CCS??

I will be very appreciate that if someone could help me correct my step of operations as following for higher execution speed.

1. Use the following .cmd to convert .out to .hex
--------------------
pan.out /* Input File: COFF file format (.out) */
-m2 /* Output Format: ASCII Hex format (.hex) */
-boot /* Enable boot table generation */
-map pan.map /* Name hex utility map file */
-o pan.hex /* Output File: ASCII Hex file (.hex) */
-parallel16 /* Generate output for a 16-bit wide Flash device */
-v5510:2 /* Set processor type */

ROMS
{
PAGE 0 : ROM : o=0x400000, l=0x200000
}
--------------------

2. Using Flashburn utility and specified the origin physical address at
0x400000 and length 0x200000. Program the flash.

3. Select boot mode as "16-bit asynchronous memory." (GPIO0 = GPIO1 GPIO2 = 1, GPIO3 = 0)

4. Close CCS, press reset button to reset DSK.

Thanks a lot.

Best regards,
SJ Hsu
SJ Hsu

> I have a problem of Spectrum digital DSK5509 bootloader. It begins that
> I turned a .out file into a .hex file and downloaded the .hex into flash
> memory, but the execution speed of the program becomes obviously slow than
> using CCS, not using flashburn to burn the program into memory, for
> debugging.
> I searched TI documents and guessed that it is because accessing flash
> rom is more slowly than saram. Is that so? And if it is, does there has
> any solution to let the execution speed becomes the same as using CCS??

If you are executing program code directly from Flash EEPROM then yes it will be much
slower than executing from internal memory or external SRAM or SDRAM. But I'm not
sure that's happening -- what should be happening is your code gets loaded from Flash
into internal and/or external memory (where it normally is during CCS download) and
then runs.

What may be more likely is that your code is not initializing external memory
correctly. You may be relying on a .gel file to do that for you when you run CCS,
and when you don't have CCS in the picture, this crucial initialization is missing.
If you don't initialize EMIF registers, then they assume very slow default settings.

My suggestion is to carefully examine your .gel file initializations and make sure
those are performed identically in your start-up code, for example a "BoardInit"
function that you call at start of main(), or similar.

-Jeff

> I will be very appreciate that if someone could help me correct my step of operations as following for higher execution speed.
>
> 1. Use the following .cmd to convert .out to .hex
> --------------------
> pan.out /* Input File: COFF file format (.out) */
> -m2 /* Output Format: ASCII Hex format (.hex) */
> -boot /* Enable boot table generation */
> -map pan.map /* Name hex utility map file */
> -o pan.hex /* Output File: ASCII Hex file (.hex) */
> -parallel16 /* Generate output for a 16-bit wide Flash device */
> -v5510:2 /* Set processor type */
>
> ROMS
> {
> PAGE 0 : ROM : o=0x400000, l=0x200000
> }
> --------------------
>
> 2. Using Flashburn utility and specified the origin physical address at
> 0x400000 and length 0x200000. Program the flash.
>
> 3. Select boot mode as "16-bit asynchronous memory." (GPIO0 = GPIO1 > GPIO2 = 1, GPIO3 = 0)
>
> 4. Close CCS, press reset button to reset DSK.
>
> Thanks a lot.
>
> Best regards,
> SJ Hsu
SJ Hsu-

> Thanks for your help and I'm trying to understand how to configure emif now,
> hopefully I can learn it more quickly and solve my problem. I have a question
> about emif. When should I configure emif registers? Should I take it as
> the first thing in main()?

Yes first thing in main(). If you are using CSL, look for EMIF_config() API.

-Jeff

> Jeff Brower G
>
> If you are executing program code directly from Flash EEPROM then yes it will be much
> slower than executing from internal memory or external SRAM or SDRAM. But I'm not
> sure that's happening -- what should be happening is your code gets loaded from Flash
> into internal and/or external memory (where it normally is during CCS download) and
> then runs.
>
> What may be more likely is that your code is not initializing external memory
> correctly. You may be relying on a .gel file to do that for you when you run CCS,
> and when you don't have CCS in the picture, this crucial initialization is missing.
> If you don't initialize EMIF registers, then they assume very slow default settings.
>
> My suggestion is to carefully examine your .gel file initializations and make sure
> those are performed identically in your start-up code, for example a "BoardInit"
> function that you call at start of main(), or similar.
>
> -Jeff
>
> +++++++++++++++++++++++++++++++++++++++++++++++++
> Shuo-Jen Hsu, Graduate Student,
> Department of Electrical and Control Engineering,
> National Chiao-Tung University
> Hsinchu,Taiwan, ROC
> Tel: +886-3-5712121 ext:54427
> Email: h...@yahoo.com.tw
> +++++++++++++++++++++++++++++++++++++++++++++++++