Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eccbfdb

Browse files
committed
add psram to malloc only if interrupts are not in IRAM
1 parent 27e61dc commit eccbfdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/esp32/esp32-hal-psram.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ bool psramInit(){
7777
log_e("PSRAM could not be added to the heap!");
7878
return false;
7979
}
80-
#endif
81-
#if CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL
80+
#if CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL && !CONFIG_ARDUINO_ISR_IRAM
8281
heap_caps_malloc_extmem_enable(CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL);
82+
#endif
8383
#endif
8484
spiramDetected = true;
8585
log_d("PSRAM enabled");

0 commit comments

Comments
 (0)