Skip to content

Commit 2a6103a

Browse files
committed
Don't deconfigure GPIO16/17 in Pico D4
1 parent f256aab commit 2a6103a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: cores/esp32/esp32-hal-psram.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bool psramInit(){
5353
#if CONFIG_IDF_TARGET_ESP32
5454
uint32_t chip_ver = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
5555
uint32_t pkg_ver = chip_ver & 0x7;
56-
if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32D2WDQ5 || pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD2 || pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4) {
56+
if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32D2WDQ5 || pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD2) {
5757
spiramFailed = true;
5858
log_w("PSRAM not supported!");
5959
return false;
@@ -67,8 +67,10 @@ bool psramInit(){
6767
spiramFailed = true;
6868
log_w("PSRAM init failed!");
6969
#if CONFIG_IDF_TARGET_ESP32
70-
pinMatrixOutDetach(16, false, false);
71-
pinMatrixOutDetach(17, false, false);
70+
if (pkg_ver != EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4) {
71+
pinMatrixOutDetach(16, false, false);
72+
pinMatrixOutDetach(17, false, false);
73+
}
7274
#endif
7375
return false;
7476
}

0 commit comments

Comments
 (0)