ESP32-PICO-D4 external SPRAM

chuledeco
Posts: 3
Joined: Thu Feb 13, 2020 3:22 pm

ESP32-PICO-D4 external SPRAM

Postby chuledeco » Thu Feb 13, 2020 3:32 pm

Hello and thanks in advance

I was trying to understand why I can't add my external PSRAM working with my ESP32-pico-d4 chip

I'm using ESP-IDF v4.0 with eclipse. My PSRAM chip is LY68L6400 and is connected as described below:

PSRAM ESP32-PICO-D4
CS IO17 (pin 27)
SCLK CLK (pin 31)
SIO0/SI SD0
SIO1/SO SD1
SIO2 SD2
SIO3 SD3

The CS is configured in the menuconfig

In the spiram_psram.c file I see the same configuration I have:

Code: Select all

#define PSRAM_SPIQ_SD0_IO          7
#define PSRAM_SPID_SD1_IO          8
#define PSRAM_SPIWP_SD3_IO         10
#define PSRAM_SPIHD_SD2_IO         9
but after loading anything to the chip I get:


I (225) psram: This chip is ESP32-PICO
E (230) cpu_start: Failed to init external RAM!
abort() was called at PC 0x4008136e on core 0

My PSRAM chip is connected to the VDD_SDIO and the voltage is 3.3V (measured)

With my oscilloscope, I can see signals in all pins except SIO3

If anyone can help me a bit I'll be very thanked because I'm very stuck with that.

Thanks in advance, Julian
Last edited by chuledeco on Wed Feb 19, 2020 6:07 pm, edited 2 times in total.

ESP_Vikram
Posts: 11
Joined: Fri Nov 23, 2018 12:07 pm

Re: ESP32-PICO-D4 external SPRAM

Postby ESP_Vikram » Thu Feb 13, 2020 3:54 pm

Maybe not useful for you...

But, I had similar problem few months back.

Turns out I was using pin 9 for CLK.


Following change worked for me...

If you go to $IDF_PATH/components/esp32/spiram_psram.c

There is a define:

Code: Select all

#define PICO_PSRAM_CLK_IO          6
I changed this to

Code: Select all

#define PICO_PSRAM_CLK_IO          9
...and it worked.

Maybe similar change you are missing?

chuledeco
Posts: 3
Joined: Thu Feb 13, 2020 3:22 pm

Re: ESP32-PICO-D4 external SPRAM

Postby chuledeco » Thu Feb 13, 2020 4:14 pm

ESP_Vikram wrote:
Thu Feb 13, 2020 3:54 pm
Maybe not useful for you...

But, I had similar problem few months back.

Turns out I was using pin 9 for CLK.


Following change worked for me...

If you go to $IDF_PATH/components/esp32/spiram_psram.c

There is a define:

Code: Select all

#define PICO_PSRAM_CLK_IO          6
I changed this to

Code: Select all

#define PICO_PSRAM_CLK_IO          9
...and it worked.

Maybe similar change you are missing?
Hello Vikram, thanks for your answer

I have the PSRAM SCLK pin connected to the CLK pin of the ESP32-PICO-D4 which is number GPIO6. It seems in my case I'm using the default PICO_PSRAM_CLK_IO

Thanks again, Julian

chuledeco
Posts: 3
Joined: Thu Feb 13, 2020 3:22 pm

Re: ESP32-PICO-D4 external SPRAM

Postby chuledeco » Fri Feb 14, 2020 9:39 am

ESP_Vikram wrote:
Thu Feb 13, 2020 3:54 pm
Maybe not useful for you...

But, I had similar problem few months back.

Turns out I was using pin 9 for CLK.


Following change worked for me...

If you go to $IDF_PATH/components/esp32/spiram_psram.c

There is a define:

Code: Select all

#define PICO_PSRAM_CLK_IO          6
I changed this to

Code: Select all

#define PICO_PSRAM_CLK_IO          9
...and it worked.

Maybe similar change you are missing?
Can you Vikram please tell me if the rest of your pines was connected as I did?
Also, did you use IDF 4.0?
Finally, did you configure something else than turn on SPI RAM on the menuconfig and set the CS pin?

Thanks again

Who is online

Users browsing this forum: Baidu [Spider], MSN [Bot] and 32 guests