cancel
Showing results for 
Search instead for 
Did you mean: 

Running code in external SDRAM is too slow.

Boram Youn
Associate II
Posted on November 07, 2017 at 07:37

Hi,

I'm using STM32F769NI based self-designed board and running my application in external SDRAM which is copied from pre-programmed external NAND flash: To make it possible I swapped FMC bank of SDRAM. The default address range of the SDRAM starts from 0xC0000000 but in my application it starts from 0x60000000. Also with some more configurations, the application stores all the code-including ro, text, rw, stack and heap- in SDRAM. The compiler is IAR EWARM.

The problem is the speed of running a application is too slow compared to run the same code from internal FLASH.

The speed is measured using SYSTICK and the time taken to run the application is more than 6 times longer if it was executed in external SDRAM.

I tried to run only the code(not the whole program) in the internal Flash but the size of binary file exceeds 1GB and that's not acceptable in my case at all. I assume the structure of the binary file caused the size to big since the whole address range from 0x08000000(internal Flash) to 0x6xxxxxxx(external SDRAM) is stored in binary file.

 Is there any solution for this situation? 

##external-sdram ##stm32
3 REPLIES 3
Posted on November 07, 2017 at 10:26

The 6x number doesn't surprise me, the F4 SDRAM executed at such speeds. 

Make sure the caching modes/options are correctly configured. 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Boram Youn
Associate II
Posted on November 07, 2017 at 10:36

Hi, Clive.

I've enabled cache in SDRAM using MPU configuration. (Also it was one of the reason why I had to swap the FMC bank.)

Thanks for your advice about multiregion object file. 

Posted on November 07, 2017 at 10:31

Keil's FromELF tool will split a multiregion object file into multiple  .BIN files.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..