ESP32-WROVER-B has 8MB of PSRAM ! Where ?

GeorgeFlorian1
Posts: 160
Joined: Thu Jan 31, 2019 2:32 pm

ESP32-WROVER-B has 8MB of PSRAM ! Where ?

Postby GeorgeFlorian1 » Mon May 13, 2019 9:00 am

Hello !

I am new to the world of electronics and I still have A LOT to learn, so please be patient with me ! Thank you !

I have a ESP32-WROVER-B module: this one.
It says in the documentation that it has 8MB of PSRAM.

In my current project I am using SmartMatrix library to drive a 64x32 RGB Matrix.
The ESP32 can continuously shift data from RAM through the I2S peripheral in parallel to GPIO pins, without using up CPU cycles.
It uses DMA (Direct Memory Access), right ?

From what I've read, a ESP32 usually has around 500kb of RAM. So, after the WiFi, TCP/IP, Cache and Freertos take their fair share of the RAM, my code + SmartMatrix library will use the rest, correct ?

Now, my question(s) is this: what about the 8 freaking MB of PSRAM ? What are those for ? Can I use them for something ? Not me, me, because I lack the coding skills to actually do something like that, but somebody who actually knows what he's doing.
Should it be possible for the SmartMatrix library to use 8 MB of RAM instead of the 200kb leftover ?

ESP_Sprite
Posts: 9016
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-WROVER-B has 8MB of PSRAM ! Where ?

Postby ESP_Sprite » Mon May 13, 2019 10:09 am

- You can use 4MiB of the 8MiB of external RAM in the same way as internal memory, give you enable that in menuconfig. However....
- You cannot use DMA with a buffer in external RAM. So while you can probably move a bunch of other stuff to the external memory, the DMA buffers need to stay in internal memory. (I'm halfway sure that DMA buffers are the bulk of the memory usage of Smartmatrix.)
- The remaining 4MiB of PSRAM can only be used through a special API; you'd need to integrate that into your peoject manually if you want to use that, and as it needs to be accessed through a bankswitching scheme, not every program will be adaptable to this.

GeorgeFlorian1
Posts: 160
Joined: Thu Jan 31, 2019 2:32 pm

Re: ESP32-WROVER-B has 8MB of PSRAM ! Where ?

Postby GeorgeFlorian1 » Tue May 14, 2019 8:08 am

ESP_Sprite wrote:
Mon May 13, 2019 10:09 am
- You can use 4MiB of the 8MiB of external RAM in the same way as internal memory, give you enable that in menuconfig. However....
- You cannot use DMA with a buffer in external RAM. So while you can probably move a bunch of other stuff to the external memory, the DMA buffers need to stay in internal memory. (I'm halfway sure that DMA buffers are the bulk of the memory usage of Smartmatrix.)
- The remaining 4MiB of PSRAM can only be used through a special API; you'd need to integrate that into your peoject manually if you want to use that, and as it needs to be accessed through a bankswitching scheme, not every program will be adaptable to this.
So it's either way beyond my current skills or it must be implemented in the respective library.

Thanks for the quick answer.

Who is online

Users browsing this forum: No registered users and 126 guests