cancel
Showing results for 
Search instead for 
Did you mean: 

Run code from external RAM

Bombadil
Associate II

Hello,

for a new project I plan to execute the code from an external SRAM connected via FMC.

Are there any experience on speed leakage?

In an other Topic I read that there are losses of 4 times the speed compared to the embedded Flash.

https://community.st.com/s/question/0D50X00009XkaieSAB/code-execution-from-external-ram

Are there any advantages using a SDRAM instead of a SRAM?

Or do I have to use 32 databits for a compareable performance?

So far I plan to use a STM32F4xx with about 160MHz.

I haven't selected a SRAM yet..

3 REPLIES 3
AvaTar
Lead

If I'm not mistaken, external RAM is connected via the FSMC to the AHB bus, which has no connection to the I bus. So no, you can't execute code from external RAM on the F4.

Bombadil
Associate II

OK, didn't knew that, thank you!

But in this case I could use a STM32H7

According to the following sheet, I don't even lose performance.

Page 15

ROM-Memory: External SRAM

RAM-Memory: Internal SRAM

AN5188:

https://www.st.com/content/ccc/resource/technical/document/application_note/group0/d8/39/10/2f/ee/c9/4b/19/DM00514974/files/DM00514974.pdf/jcr:content/translations/en.DM00514974.pdf

Or do I miss anything?

Of course before I start designing, I will get one of those Eval-Boards and try it out :)

Primary bank SDRAM should be fine, but you're looking at a 6x slower read and it is not cached.

The STM32F429I-DISCO has SDRAM on the secondary bank, but I think there is a bank swap or MPU trick to get it to be executable.

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