espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.37k stars 7.21k forks source link

Using QSPI for in-package PSRAM (IDFGH-12497) #13507

Open hopkinskong opened 5 months ago

hopkinskong commented 5 months ago

Answers checklist.

General issue report

Hi,

I am currently using ESP32-S3R8V which contains an in-package 8MB Octal SPI PSRAM. Since I wish to free up 4 GPIOs for other uses, is it possible to drive the in-package PSRAM with QSPI mode? (My Flash is also in QSPI mode.)

If it is not possible in the boot stage / bootloader, can I do that in application after my ESP32S3 has boot up?

Thanks.

andylinpersonal commented 5 months ago

S3R8(V) and S3R16V’s in-package PSRAM chips from AP Memory don’t support any IO mode narrower than OPI at all. Details are in AP Memory’s datasheets. If you really want to free up these four pins, you can use ESP32-S3R2 with a smaller 2MB QSPI PSRAM, or connect S3 to your own external ESP or AP Memory’s QSPI PSRAM chip instead.

hopkinskong commented 5 months ago

Thanks. How about using the PSRAM as a temporary storage only? For example, I will fill the internal RAM first, then dump the data onto the PSRAM, then I disable the PSRAM via some ESP-IDF API (or making sure the PSRAM's CS will never go LOW), then fill the internal RAM again, re-enable the PSRAM and copy data from internal RAM to PSRAM, and so-on?

nopnop2002 commented 5 months ago

@hopkinskong

then I disable the PSRAM via some ESP-IDF API re-enable the PSRAM

I'm also looking for an API that works like this, but I can't find it.