cancel
Showing results for 
Search instead for 
Did you mean: 

New to external Sram Sdram

ASSAAD.ASSAAD
Associate II
Posted on January 17, 2017 at 09:08

Hello all

We are new to external SRam and Sdram so I have some question we could don't verify the answer maybe because of language or lack of knowledge.

we need to add external ram to stm32f4  and stm32f7

So how to choose which is the memory is best for me SRAM or SDRAM  ; rather than the price ;

in our application it is an audio application ; in the previous version we read the audio file from USB flash to ram buffer  and then using DMA we write it to I2s ;   but  in the this configuration we have problems in the audio quality and that because of performing other tasks .

now  we thing to add external RAM and copy the whole Audio file once to ram ( about 1MB to 2MB ) ,

Now we : is it possible to map the DMA to external RAM  to write to I2S ? ( M4 and M7)

does that mean when I add an external RAM to my MCU that now I can define big buffers in my software directly ? whats is the speed performance of SRAM and SDRAM ?

Thank you all

5 REPLIES 5
T J
Lead
Posted on January 17, 2017 at 22:43

Hi,

SDRAM uses less footprint but effectively slower than SRAM @ full processor bus speed.

SRAM is very expensive and uses too many pins.

@44KHz (I Guess)  the SDRAM will eat the job at approx 50-100MByte/Sec bandwidth. (depending on your clock setup)

SRAM is small,  less than 1MByte.   $20 guess

SDRAM is huge 4/16/32MBytes cheap... $3 guess

You can get this one :

http://www.digikey.com/product-detail/en/issi-integrated-silicon-solution-inc/IS42S16100H-7TL/706-1446-ND/5683868

   $1  1M x 16, perfect for your project.

There are some guidelines for SDRAM PCB layout which should be taken very seriously.

Definately use 16Bit SDRAM.

It works like a dream on the STM32F746.

Posted on January 18, 2017 at 09:45

Thank you Marsh ; your information is great

for SDRam solution ; for the software view ; since I am not a good software engineer I am most hardware ;

when I use an external SDRAM ; how can I axess it and define larger buffers in my code ?

also is it possible to point the DMA to those buffers and ( I2S , usart ... ) ? or do I still need to copy from SDRAM to internal buffers to use DMA ?

Thank you in advanced

Posted on January 18, 2017 at 13:21

After you have set up the SDRAM registers, It is just like any other memory.

DMA access, data structures, all good.

Memory  location  0xC0000000 or 0xD0000000 I think.

You can define any number of buffers and any size.

Posted on January 18, 2017 at 15:37

Can I use the internal SRAM and external SDAM as data memory same time ?

if yes can you show me how can I tell the controller that , and how can I define buffers and use them , please ?

Posted on January 18, 2017 at 22:03

I am not sure the correct method of use, I am a beginner in C, however,

Yes you can read all the memories directly or indirectly simultaneously.

the SDRAM.h.c solution make the SDRAM look like internal ram, seemless.

only that the Address has changed to 0xC000000.

and of course, the SDRAM is about 4x slower than the internal memory.