ESP32-S2 Saola, enabling PSRAM causes wifi init to fail with ESP_ERR_NO_MEM
Posted: Mon Aug 02, 2021 10:10 pm
I just enabled external SPI ram on my ESP-32S2 Saola, and it is causing wifi init to fail with a 'no memory error'.
I've made the change in the Visual Studio Code config editor, and it appears to change this line:
CONFIG_ESP32S2_SPIRAM_SUPPORT=y
but also automatically changes these lines:
-CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32
+CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y
I imagine this change from a dynamic buffer to static buffer is causing the issue.
Things Ive tried:
1. undoing the wifi buffer change in sdkconfig. It just gets reverted when I click build.
2. reducing my own application's ram usage by ~2 KB. maybe it wasn't enough? My application typically has 16KB of free ram (low water mark), so its hard to image enabling PSRAM evaporated all of that ram.
3. having the PSRAM allocatable with malloc, with heap_caps, or memory mapped. No difference.
This seems like a bug.
I've made the change in the Visual Studio Code config editor, and it appears to change this line:
CONFIG_ESP32S2_SPIRAM_SUPPORT=y
but also automatically changes these lines:
-CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32
+CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y
I imagine this change from a dynamic buffer to static buffer is causing the issue.
Things Ive tried:
1. undoing the wifi buffer change in sdkconfig. It just gets reverted when I click build.
2. reducing my own application's ram usage by ~2 KB. maybe it wasn't enough? My application typically has 16KB of free ram (low water mark), so its hard to image enabling PSRAM evaporated all of that ram.
3. having the PSRAM allocatable with malloc, with heap_caps, or memory mapped. No difference.
This seems like a bug.