From 8fe0efe8c0bb462cf0c5472d34dcae11ce4819c2 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Wed, 23 Mar 2022 12:10:21 +0100 Subject: [PATCH] Fix boot freeze when trying to init PSRAM on Pico D4 (#6434) * Fix boot freeze when trying to init PSRAM on Pico D4 * Don't deconfigure GPIO16/17 in Pico D4 --- cores/esp32/esp32-hal-psram.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cores/esp32/esp32-hal-psram.c b/cores/esp32/esp32-hal-psram.c index 44612562..de5b7c00 100644 --- a/cores/esp32/esp32-hal-psram.c +++ b/cores/esp32/esp32-hal-psram.c @@ -67,8 +67,10 @@ bool psramInit(){ spiramFailed = true; log_w("PSRAM init failed!"); #if CONFIG_IDF_TARGET_ESP32 - pinMatrixOutDetach(16, false, false); - pinMatrixOutDetach(17, false, false); + if (pkg_ver != EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4) { + pinMatrixOutDetach(16, false, false); + pinMatrixOutDetach(17, false, false); + } #endif return false; }