esp32-U4WDH external PSRAM not being detected

Satvik728845
Posts: 2
Joined: Sat Jul 02, 2022 11:25 am

esp32-U4WDH external PSRAM not being detected

Postby Satvik728845 » Mon Jul 04, 2022 4:47 am

Context:
I have been trying to use an external PSRAM along with esp32 U4WDH. The PSRAM I am using is from espressif itself.

I have used the data pins as;
(These pin configurations are shown in the esp32 datasheet, I have tried both configurations and none of them can detect PSRAM)

SD_DATA_1 - SIO0/SI
GPIO17 - SIO1/SO
SD_DATA_0 - SIO2
SD_CMD - SIO3
SD_CLK - CLK
GPIO10 - CS#
GND - VSS
VDD_SDIO - VDD

Image


SD_DATA_1 - SIO0/SI
SD_DATA_0 - SIO1/SO
SD_DATA_3 - SIO2
SD_DATA_2 - SIO3
SD_CLK - SCLK
GPIO10 - CE#
GND - VSS
VDD_SDIO - VDD
Image

The embedded flash used in U4WDH has the same data pins and CLK pin.
I am using Arduino IDE for this. I have chosen "ESP32 Dev Module" as my board type and I have enabled the PSRAM via the Tools menu.
Image

The code with which I am trying to detect and get the size of PSRAM is;
[Codebox]
  1.  
  2. #include <SPI.h>
  3. #include <Arduino.h>
  4. #include<esp32-hal.h>
  5. void setup() {
  6.   Serial.begin(115200);
  7.   //delay(2000);
  8. // pinMode(3,OUTPUT);
  9. // delay(200);
  10. //
  11. //  digitalWrite(3,HIGH);
  12. //  delay(500);
  13.  Serial.print("Total heap:");
  14.   Serial.println(ESP.getHeapSize());
  15.   Serial.print("Free heap: ");
  16.   Serial.println(ESP.getFreeHeap());
  17. //  Serial.print("TOtal psram size : ");
  18. //  Serial.println(esp_spiram_get_size());
  19.   Serial.print("PSRAM INIT : ");
  20.   Serial.println(psramInit());
  21.    Serial.print("PSRAM Found : ");
  22.   Serial.println(psramFound());
  23. if(psramFound()){
  24. //  Serial.print("Total PSRAM using caps:");
  25. //  Serial.println(heap_caps_get_free_size(MALLOC_CAP_SPIRAM));
  26.   Serial.print("Total PSRAM:");
  27.   Serial.println(ESP.getPsramSize());
  28.   Serial.print("Free PSRAM: ");
  29.   Serial.println(ESP.getFreePsram());
  30.  // Serial.setDebugOutput(true);
  31. }
  32. }
  33. void loop() {
  34.   delay(2000);
  35.   }
[/Codebox]


Problems:

This is the log that I get when I put the core debug level to "Verbose".
...............................................................................

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, 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:13516
load:0x40080400,len:3604
entry 0x400805f0
[ 2][W][esp32-hal-psram.c:61] psramInit(): PSRAM not supported!
Total heap:365028
Free heap: 340280
PSRAM INIT : 0
PSRAM Found : 0


.....................................................................................

Other codes, which probably don't use PSRAM, work perfectly fine.


Things I have tried so far:

I have used the same code in EPS32-D0WD and ESP32-PICOD4, they show the PSRAM with size of it.

I have externally pull-ed up the chip select pin, but I don't get 3.3V at chip select.

Connected GPIO 4 to the chip select pin and In the code, I did digitalWrite HIGH.
Attachments
Annotation 2022-07-06 162558.jpg
Annotation 2022-07-06 162558.jpg (48.03 KiB) Viewed 1393 times
Annotation 2022-07-06 162703.jpg
Annotation 2022-07-06 162703.jpg (67.42 KiB) Viewed 1393 times
Annotation 2022-07-06 162335.jpg
Annotation 2022-07-06 162335.jpg (40.34 KiB) Viewed 1393 times

Who is online

Users browsing this forum: Google [Bot] and 55 guests