This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

performance in flash or RAM

Note: This was originally posted on 6th July 2010 at http://forums.arm.com

Hello.

I tried to improve the speed of an IRQ function by putting it to RAM.
The function is in fact in RAM (as an assembly view and the debugger show), but the time spent is the same than in Flash.
I use a test point and an oscilloscope to check the duration, not a software estimation.
µP : STM32F101 @ 36MHz, 1 wait state.

Why do I get the same result ?
What do I miss ?

Thanks for your help
         Denis
Parents
  • Note: This was originally posted on 16th July 2010 at http://forums.arm.com

    You didn't miss anything.
    At 32 Mhz there is little difference between flash execution and RAM execution.  Flash has one wait state at 32Mhz, but when executing out of RAM, the instruction fetch and data R/W are running over the same DCode bus.  Now if you were running a STM32F103 @72 Mhz, there may or may not be a difference, I have not yet tried.  It runs fast enough out of flash.
Reply
  • Note: This was originally posted on 16th July 2010 at http://forums.arm.com

    You didn't miss anything.
    At 32 Mhz there is little difference between flash execution and RAM execution.  Flash has one wait state at 32Mhz, but when executing out of RAM, the instruction fetch and data R/W are running over the same DCode bus.  Now if you were running a STM32F103 @72 Mhz, there may or may not be a difference, I have not yet tried.  It runs fast enough out of flash.
Children
No data