lpcware

Speed comparison between on-chip SRAM and FlashRAM

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by JohnR on Tue Dec 11 17:59:43 MST 2012
Hi,

I am going again to expose my ignorance.

My Diolan board has a LPC4300 and an S29AL016J70TF1010 flash RAM. In the current system M4 is running a pair of SPI-based ADCs and a SPI-based DAC using the SGPIO module.

Initially the code was run from on-chip SRAM and the speed was excellent. The 14-bit ADCs and 16-bit DAC could be serviced (the data read and a new value sent to the DAC) within about 1.5 microseconds.

Running exactly the same code from flash at 0x1c000000 took 20 microseconds.

Looking at the read specs for the flash, 55/70 nanoseconds, I suppose this is reasonable.

But I had thought for some reason that code in flash was automatically (automagically?) copied at startup to SRAM but I guess that this is not the case.

Is there any way getting this to run faster? Is there a way of moving code from flash to SRAM?

JohnR.


Outcomes