PSRAM error in ESP32-CAM

nacheitor
Posts: 6
Joined: Fri Oct 09, 2020 8:13 am

PSRAM error in ESP32-CAM

Postby nacheitor » Wed Feb 03, 2021 12:21 pm

Hi, I am trying to make a project with an ESP32-CAM using the Arduino ide. The particular microcontroller is this (https://www.amazon.es/TECNOIOT-ESP32-CA ... M%C3%85%C5% BD% C3% 95% C3% 91 & dchild = 1 & keywords = esp32 + cam & qid = 1611749295 & sr = 8-7). According to the specifications it has psram memory. I configure it in the Arduino IDE as AI-Thinker ESP32-CAM and ESP32 Wrober module. But in none of those settings can I access the PSRAM. When I run these instructions:

Code: Select all

psramInit();
 
  Serial.println("\n\n##################################");
  Serial.printf("Internal Total heap %d, internal Free Heap %d\n", ESP.getHeapSize(), ESP.getFreeHeap());
  Serial.printf("SPIRam Total heap %d, SPIRam Free Heap %d\n", ESP.getPsramSize(), ESP.getFreePsram());
  Serial.printf("ChipRevision %d, Cpu Freq %d, SDK Version %s\n", ESP.getChipRevision(), ESP.getCpuFreqMHz(), ESP.getSdkVersion());
  Serial.printf("Flash Size %d, Flash Speed %d\n", ESP.getFlashChipSize(), ESP.getFlashChipSpeed());
  Serial.println("##################################\n\n");

The output is:

Code: Select all

##################################
Internal Total heap 363600, internal Free Heap 338348
SPIRam Total heap 0, SPIRam Free Heap 0
ChipRevision 1, Cpu Freq 240, SDK Version v3.2.3-14-gd3e562907
Flash Size 4194304, Flash Speed 80000000
##################################
I don't know if it is necessary to initialize or configure the memory in some special way to be able to use it. If anyone knows any way to use it I would appreciate the help.

Thanks in advance.

Radu79
Posts: 29
Joined: Tue Nov 17, 2020 9:50 pm

Re: PSRAM error in ESP32-CAM

Postby Radu79 » Sat Feb 06, 2021 4:17 pm

Esp32 cam comes with 4mb of ram.
Did you try the web streaming example? If you can change the image size to 2MP then you have the ram.
This line tells you if you have psram: if(psramFound())

Btw, I've noticed, if you leave GPIO 0 connected to ground after you restart the program it says it has 0 PSRAM.

Who is online

Users browsing this forum: No registered users and 83 guests