Showing results for 
Search instead for 
Did you mean: 

Code execution from external RAM

Associate II
Posted on October 19, 2009 at 12:31

Code execution from external RAM

#fsmc-code-execution-slow-in-sram #poorly-chosen-micro
Associate II
Posted on January 15, 2014 at 20:27

>> not surprising, the STM32 external bus is designed for data storage, not for code execution <<

For our application we connected the ST32F407IG via FSMC to a 8-MBit SRAM (CY7C1051DV33). We have to execute the code from the SRAM, because the code is changing during runtime. It's about 4 times slower than executed from internal flash. What is the max. speed for code execution in external SRAM (comp. to int. Flash)? If it is indeed that slow, what are the alternatives?

Thanks in advance,


Posted on January 15, 2014 at 20:42

It's always going to be egregiously slow. The pins transition on a 84 MHz clock, and several transitions are required for a complete transaction.

The SDRAM on the 429 is 6x slower

The FLASH while intrinsically slow is protected by a caching mechanism that in some cases makes it faster than Internal SRAM.

Solutions, run your code that's critical from Internal SRAM, or pick a more suitable processor with a proper cache architected into the design.

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