How to store Arrays or Samples in SDRAM?

I am interested in storing a bunch of arrays in memory, and their total size is higher than the built in program memory of the daisy.

How would I go about moving them into the SDRAM? (for example how could I store a 5 second tuba sample OR bitmap of a mountain view on the SDRAM that I could then access from my code.


You can declare an array using the DSY_SDRAM_BSS macro to store it in SDRAM:

float DSY_SDRAM_BSS data[buffsize];

1 Like

will this work if the header files are larger than the system memory? in other words…if i have an array that is 2MB and i need it to be stored in SDRAM so the program can call it later.,…will this macro work?

thanks so much

You cannot store initialized data in SDRAM. It’s bss only, and I don’t think stdlib can initialize it to zero because the firmware has to boot and enable SDRAM before it can be used. There is no place for your prerecorded tuba sample to live, as RAM is cleared at power off and there isn’t room in the embedded flash to store it. It would have to be loaded into SDRAM manually from either QSPI flash or an SD card or something.

Hi Dan,

It’s possible with a bit of effort, i.e. see this thread

1 Like