electro-smith / DaisyDuino

Arduino Support for the Daisy Audio Platform.
https://www.electro-smith.com/daisy
MIT License
92 stars 20 forks source link

v1.2.0 - Feature/sdram #20

Closed stephenhensley closed 4 years ago

stephenhensley commented 4 years ago

Ability to use SDRAM has been added.

Currently only bss is used for SDRAM, which means no initialized data can be loaded there. Usage works as follows:

// SDRAM Variables must be global
// and must use the "DSY_SDRAM_BSS" attribute.

// This creates 1MB of chars
char DSY_SDRAM_BSS my_big_buffer[1024*1024];

void setup() {}

void loop() {}
stephenhensley commented 4 years ago

I also added MPU files to mark the SDRAM as cached, and the sram starting at 0x30000000 as non-cached (for DMA buffers), but because the linker script doesn't have that RAM region defined we still can't enable the DCache without adding cache maintenance to the SAI callback.

I'm looking into making an update on the STM32Duino variant to fix this, or add a custom linker, but that will be in a later update.

stephenhensley commented 4 years ago

External SDRAM usage