ESP32 Wrover E - E (104) psram: PSRAM ID read error: 0xfffbff07 - Framework Arduino

Hi! I have been designing a custom board based on the ESP32 Wrover E and have successfully checked the modules I use (i2c, uart, spi, twai), showing that the hardware is OK.

The problem is when I want to enable the PSRAM memory of the esp32. As I have ESP32-WROVER-IE-N16R8, I have 8 MB of PSRAM memory, which should be able to occupy 4 MB as I understand. As it is a custom board, I decided to use the esp-wrover-kit board, my platform.ini looks like this:

[env:wrover-kit]
platform = espressif32
board = esp-wrover-kit
board_build.flash_mode = qio
board_build.f_flash = 80000000
framework = arduino
monitor_speed = 115200
build_flags =
	  -DCORE_DEBUG_LEVEL = 5
	  -DBOARD_HAS_PSRAM
	  -mfix-esp32-psram-cache-issue

My main code is simple, to replicate the error I have the following:

#include <Arduino.h>

void setup() {
  Serial.begin(115200);

  if(psramInit()){
    Serial.println("Se inicializo correctamente!");
  }
  else{
    Serial.println("Error en inciar la PSRAM");
  }

  delay(1000);
  Serial.printf("Total heap: %d \n", ESP.getHeapSize());
  Serial.printf("Free heap: %d \n", ESP.getFreeHeap());
  Serial.printf("Total PSRAM: %d \n", ESP.getPsramSize());
  Serial.printf("Free PSRAM: %d \n", ESP.getFreePsram());
}

void loop() {
}

This gives me the error:

rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
E (88) psram: PSRAM ID read error: 0xfffbff07
Error en inciar la PSRAM
Error en inciar la PSRAM
Total heap: 371772 
Free heap: 346740
Total PSRAM: 0
Free PSRAM: 0
ets Jul 29 2019 12:21:46

To verify if the error is from the internal PSRAM of the module, I switched to the Arduino IDE occupying the following configuration:

In Arduino IDE for the same project I showed before, it gives me the following:

configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1240
load:0x40078000,len:13012
load:0x40080400,len:3648
entry 0x400805f8
Se inicializo correctamente!
Total heap: 399539 
Free heap: 342519 
Total PSRAM: 4192139 
Free PSRAM: 4192139

In arduino ide recognizes the PSRAM! My suspicions have to do with the partitions, the board configurations or some problem in platform.ini. I also saw in some forums definitions for the memory type that when I define it with some value I get the following error:

fatal error: sdkconfig.h: No such file or directory

I have tried many things and I am running out of ideas. I will be very grateful if someone can help me :slight_smile:

Best regards!

There is no “WisCore RAK11200” in the mainline Espressif/Arduino-ESP32: https://github.com/espressif/arduino-esp32/blob/2.0.14/boards.txt. (Which is what PlatformIO is using)

Are you using some fork?

Yes, my previous development board was a rakwireless devkit and it has the esp32 wrover e as core, that’s why I automatically recognized the board in Arduino IDE. The strange thing is that for my custom board neither wrover-kit nor rak work as a board, they throw the same error.

In platformio I don’t use the fork, I want to use espressif boards.

Hi there!

It seems like you’re facing a challenge with enabling PSRAM on your custom ESP32 board in PlatformIO. Given that you’ve successfully tested the modules individually and encountered this issue when activating PSRAM, it’s likely there might be specific configurations needed for your custom board.

Since it’s a custom board, configuring the board settings and partitions in PlatformIO is crucial. Additionally, specifying the correct memory type within your platform.ini file is essential. I’m not sure if there are alternative methods to activate PSRAM beyond the ones you’ve already mentioned.

Considering the differences you’ve observed between the Arduino IDE and PlatformIO setups, it might be beneficial to delve deeper into the board configurations, ensuring they align with your custom hardware.