From eccbfdb48a7d00d97886fef32228675ee910d4f7 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Tue, 19 May 2020 02:03:24 +0300 Subject: [PATCH] add psram to malloc only if interrupts are not in IRAM --- cores/esp32/esp32-hal-psram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/esp32/esp32-hal-psram.c b/cores/esp32/esp32-hal-psram.c index c5860f22..90722d10 100644 --- a/cores/esp32/esp32-hal-psram.c +++ b/cores/esp32/esp32-hal-psram.c @@ -77,9 +77,9 @@ bool psramInit(){ log_e("PSRAM could not be added to the heap!"); return false; } -#endif -#if CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL +#if CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL && !CONFIG_ARDUINO_ISR_IRAM heap_caps_malloc_extmem_enable(CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL); +#endif #endif spiramDetected = true; log_d("PSRAM enabled");