Skip to main content
Bombadil
Associate
March 25, 2019
Question

Run code from external RAM

  • March 25, 2019
  • 3 replies
  • 1637 views

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..

This topic has been closed for replies.

3 replies

AvaTar
Senior III
March 25, 2019

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.

Tesla DeLorean
Guru
March 26, 2019

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
Bombadil
BombadilAuthor
Associate
March 26, 2019

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 :)