2017-01-17 12:08 AM
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
2017-01-17 01:43 PM
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 :
$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.
2017-01-18 01:45 AM
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
2017-01-18 05:21 AM
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.
2017-01-18 07:37 AM
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 ?
2017-01-18 02:03 PM
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.