Only 4M PSRAM seen on N8R8 chip

davepl
Posts: 29
Joined: Wed Jun 27, 2018 5:29 pm

Only 4M PSRAM seen on N8R8 chip

Postby davepl » Tue Jul 25, 2023 1:29 am

I'm using a WROVER-E-N8R8 (8M flash, 8M PSRAM) on a custom PCB. The code manages to initialize PSRAM, but it only finds 4M, not 8M.

I'm using PlatformIO, though an Ardunio build. But the same code works on an 8M ESP32-S3 and reports 8M.

Is there anything special or particular I can or need to do for it to see the full 8M?

Thanks!
Dave

PS: This is the chip it's built with: https://jlcpcb.com/partdetail/3370765-E ... 8/C2973667

Code: Select all

    debugI("ESP32 PSRAM Init: %s", psramInit() ? "OK" : "FAIL");
    debugI("Version %u: Wifi SSID: \"%s\" - ESP32 Free Memory: %u, PSRAM:%u, PSRAM Free: %u",
            FLASH_VERSION, cszSSID, ESP.getFreeHeap(), ESP.getPsramSize(), ESP.getFreePsram());

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: Only 4M PSRAM seen on N8R8 chip

Postby ESP_igrr » Tue Jul 25, 2023 11:22 am

Hi Dave,

ESP32 is limited to only 4 MB of address space for external RAM. With 8 MB PSRAM modules you can use "himem" API to do bank switching, which is one of the ways how you can access physical memory which is larger than the address space.

https://docs.espressif.com/projects/esp ... himem.html

(Newer chips, such as ESP32-S2 and -S3, can map larger amounts of PSRAM into the address space without the need for bank switching.)

davepl
Posts: 29
Joined: Wed Jun 27, 2018 5:29 pm

Re: Only 4M PSRAM seen on N8R8 chip

Postby davepl » Tue Jul 25, 2023 4:59 pm

Thanks very much! I was confused by having seen the higher available counts on the S3 version, not realizing it's a significantly different chip!

Who is online

Users browsing this forum: No registered users and 89 guests