Re: Question about the speed of SPI RAM



On Mar 15, 7:32 am, Mark Borgerson <mborger...@xxxxxxxxxxx> wrote:
In article <4d7f09e0$0$41117$e4fe5...@xxxxxxxxxxxxxx>, usenet+5@c-
scape.nl says...







On 03/15/2011 12:26 AM, Like2Learn wrote:
Hi there,

We found we had to add an external RAM (SRAM or SDRAM) at the late
stage of electrical design. Basically there are only 2 GPIO pins still
available, otherwise the RAM has to share with other peripherals, such
as SPI and I2C. I prefer to connect the external RAM with SPI bus.
However, I am not sure if it is fast enough for RAM read/write. Does
anybody know the typical speed of SPI RAM read/write? Does it meet the
requirement for a device similar to an ethernet switch plus a sensor?
The data collected by the sensor is about 1K bytes per second.
Some background info: The CPU chosen is 32-bit, and can deliver 165
DMIPS at a maximum operating frequency of 100MHz.  Our application
needs 1ms time tick.

How big does the SRAM need to be ?

If you only need a modest size, here's a couple of reasonably priced parts:

Microchip 23K640 - 64Kb, 20MHz SPI
Microchip 23K256 - 256Kb, 20MHz SPI

SPI RAM is going to truly suck if it is really used as random-access
memory.  If randomly addressing word variables, you need to send two
or more bytes of address for each word retrieved.  With 20MHz SPI
clock speed, each address or data byte takes 200nSec.  Retrieving
a randomly addressed word takes 4 byte transfers, or 800nSec.  This is
really going to slow down a 100mHz processor.

Mark Borgerson- Hide quoted text -

- Show quoted text -

Good point. However, I believe the additional memory is likely to be
used only occasionally and temporarily, to swap data back and forth to
the main memory. The firmware is likely to be executed at the main
memory only. So maybe the performance is not too bad.



.