Page 1 of 1

More than 320Kb of Sram possible?

Posted: Fri Jun 03, 2022 8:00 pm
by JKoder
Hi,

Does anyone know an ESP32 board which has more than 320KB of SRAM?

I've tried various brands and models, some of them announcing they have 512 or even 520 Kb of SRAM, but have not found a board which has more than 320 Kb of SRAM.

Is the 320Kb a hardware limit of some kind on the ESP32 chip?

I have noticed similar questions have been asked before on this forum, however it is still not clear to me what the maximum amount of SRAM on an ESP32 board actually is. Hope you can help me!

Thanks!

Re: More than 320Kb of Sram possible?

Posted: Sat Jun 04, 2022 6:32 am
by WiFive
esp32 chips have 520kb sram but only 328kb is on the data bus and some memory is reserved for certain purposes. You didn't say how you are expecting to be able to use the memory in your app. If you need more ram the best option is to buy a board with external psram.

Re: More than 320Kb of Sram possible?

Posted: Sun Jun 05, 2022 8:09 am
by JKoder
Thank you WiFive for clarifying that.

My project is driving LED Matrix panels, for which I need DRAM-capable SRAM.

Are there any tricks to increase the amount of available sram on the databus?

Or do you know if there are other espressif chips which expose more sram?

Re: More than 320Kb of Sram possible?

Posted: Sun Jun 05, 2022 9:45 am
by ESP_Sprite
You could switch to an ESP32-S3, it has a DMA-capable PSRAM interface. Note that (to my knowledge) there isn't a led matrix example for that available yet, though.

Re: More than 320Kb of Sram possible?

Posted: Sun Jun 05, 2022 8:38 pm
by JKoder
Thanks for your input Esp_sprite,

I was unaware of the DRAM-capable psram interface on the S3-model. In fact, a new S3 unit just arrived last week! So now I have a very good reason to start playing with it soon!

I'm using mrfaptastic's HUB75 ESP32 I2S DMA library. You don't happen to have any experience with this lib?
If so, then I would appreciate some tips on how to get started.

The lib uses 'heap_caps_malloc' with the MALLOC_CAP_DMA flag to allocate DMA capable memory. Do you think it is possible to add (a part of) the available psram to the ESP's main memory map so that it will be transparant to the library?

Re: More than 320Kb of Sram possible?

Posted: Mon Jun 06, 2022 2:21 am
by ESP_Sprite
I think that library uses the parallel I2S interface; that's been superseded by a parallel LCD interface on the ESP32-S3, so I doubt it compiles in the first place. It'll need to be reworked for the LCD interface instead.