Page 1 of 1

Store data on PSRAM

Posted: Fri Mar 16, 2012 3:19 pm
by ibodesouza
Hello,

i want to store data, from the buffer, on the PSRAM. But i have no idea how. I`ve read that it works witch SMC or DMA but how? An example will be helpfull.

Thanks....

Re: Store data on PSRAM

Posted: Fri Mar 16, 2012 3:29 pm
by przemekbary
Hi!
First of all you need to check where the PSRAM is connected. Secondly you need to check the configuration in which the RAM works. There are a lot of factors in the formula. I'd strongly recommend to go to the documentation, which at the beginning seems to be anything but plain English. You have there also example configurations.

I attach an example project for the AT91SAM9263-EK board which worked for me.

Re: Store data on PSRAM

Posted: Fri Mar 16, 2012 4:04 pm
by ibodesouza
I don´t understand what your programm do. With which line/command I can write or push the data from one memory or buffer to an other one?

I have the SAM3S Board. There is no example for psram?

Re: Store data on PSRAM

Posted: Fri Mar 16, 2012 9:29 pm
by przemekbary
The whole point is that, if you setup your memory controller, you retrieve or store data by referring to its address

Re: Store data on PSRAM

Posted: Fri Mar 16, 2012 10:33 pm
by CptTitanic
ibodesouza wrote:I don´t understand what your programm do. With which line/command I can write or push the data from one memory or buffer to an other one?

I have the SAM3S Board. There is no example for psram?
Most of the complexity is in the initialization, which depends on how it is attached to the bus.

Then you'd access it like any other SRAM on the part. You'd use pointers, memcpy, etc. And you could implement things like malloc/free to dynamically allocated space within it if you wanted to manage it.

From the compiler/toolchain perspective you could use a linker script or scatter file to describe the memory region within which the PSRAM is located.

The C runtime startup code (ie prior to main) could set up the memory.