ESP32-D0WDR2-V3 with external flash and emmc

zhouzhendong
Posts: 4
Joined: Mon Aug 08, 2022 7:26 am

ESP32-D0WDR2-V3 with external flash and emmc

Postby zhouzhendong » Tue Aug 09, 2022 1:57 am

Hi,
AFAIK, ESP32-D0WDR2-V3 has a 2MB embedded PSRAM but only 448KB internal flash. Is it possible to connect an external flash (for code and data) and an eMMC (storage only) and make all of three (PSRAM+external flash+eMMC) work together?
When I read page 18 of ESP32 datasheet, above Table 2, it states "Table 2 lists the pin-to-pin mapping between the chip and the embedded flash/PSRAM. The chip pins listed here are not recommended for other usage." This seems to imply that the related PINs (SD_DATA0-3, SD_CLK, GPIO16) are used by embedded PSRAM and cannot be connected to external flash or emmc. Could anyone confirm if that is the case? But without using those PINs, an external flash will not be able to memory mapped into cpu memory space. Am I right?
Thanks for your help.
ZZ

ESP_LJH
Posts: 384
Joined: Tue May 18, 2021 9:21 am

Re: ESP32-D0WDR2-V3 with external flash and emmc

Postby ESP_LJH » Tue Aug 16, 2022 3:09 am

You could use those pins occupied by embedded PSRAM to connect an extenal flash( for code and data ), but you should use another free GPIO to connect an eMMC( for storage ).

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP32-D0WDR2-V3 with external flash and emmc

Postby ESP_igrr » Tue Aug 16, 2022 9:08 am

Note that this use case is easier to achieve on ESP32-S3, where the SD/eMMC connection can use any available GPIO.

On the ESP32, you can probably connect the eMMC in 4-line mode to the "SD slot 1" GPIOs (12-15, 2, 4). Depending on your requirements for transfer speed, you may even be okay with running eMMC in 1-line mode. You could also consider using an SD NAND chip instead of an eMMC, which is essentially an SD card in a chip package. It also works in 4-line or 1-line mode.

zhouzhendong
Posts: 4
Joined: Mon Aug 08, 2022 7:26 am

Re: ESP32-D0WDR2-V3 with external flash and emmc

Postby zhouzhendong » Wed Aug 31, 2022 1:37 am

Thanks guys for the replies.
I have successfully connected external flash to the same SPI bus as PSRAM and uses a different CS (SD_CMD). That works fine.
So the datasheet's wording "pins listed here are not recommended for other usage" seems misleading.
emmc is another story and needs to be connected to alternative SD_DATAx pins.
Cheers

Who is online

Users browsing this forum: lucacusso and 29 guests