Chapter 2. API Reference
• from 0 to 131072 if SPIRAM_USE_MALLOC && CONFIG_ESP32S2_SPIRAM_SUPPORT
Default value:
• 16384 if SPIRAM_USE_MALLOC && CONFIG_ESP32S2_SPIRAM_SUPPORT
CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
Try to allocate memories of WiFi and LWIP in SPIRAM firstly. If failed, allocate internal memory
Found in: Component config > ESP32S2-specific > CONFIG_ESP32S2_SPIRAM_SUPPORT > SPI RAM
config
Try to allocate memories of WiFi and LWIP in SPIRAM firstly. If failed, try to allocate internal memory
then.
Default value:
• No (disabled) if (SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC) && CON-
FIG_ESP32S2_SPIRAM_SUPPORT
CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL
Reserve this amount of bytes for data that specifically needs to be in DMA or internal memory
Found in: Component config > ESP32S2-specific > CONFIG_ESP32S2_SPIRAM_SUPPORT > SPI RAM
config
Because the external/internal RAM allocation strategy is not always perfect, it sometimes may happen
that the internal memory is entirely filled up. This causes allocations that are specifically done in internal
memory, for example the stack for new tasks or memory to service DMA or have memory that’s also
available when SPI cache is down, to fail. This option reserves a pool specifically for requests like that;
the memory in this pool is not given out when a normal malloc() is called.
Set this to 0 to disable this feature.
Note that because FreeRTOS stacks are forced to internal memory, they will also use this memory pool;
be sure to keep this in mind when adjusting this value.
Note also that the DMA reserved pool may not be one single contiguous memory region, depending on
the configured size and the static memory usage of the app.
Range:
• from 0 to 262144 if SPIRAM_USE_MALLOC && CONFIG_ESP32S2_SPIRAM_SUPPORT
Default value:
• 32768 if SPIRAM_USE_MALLOC && CONFIG_ESP32S2_SPIRAM_SUPPORT
CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY
Allow .bss segment placed in external memory
Found in: Component config > ESP32S2-specific > CONFIG_ESP32S2_SPIRAM_SUPPORT > SPI RAM
config
If enabled, variables with EXT_RAM_ATTR attribute will be placed in SPIRAM instead of internal
DRAM. BSS section of lwip, net80211, pp, bt libraries will be automatically placed in SPIRAM. BSS
sections from other object files and libraries can also be placed in SPIRAM through linker fragment
scheme extram_bss.
Note that the variables placed in SPIRAM using EXT_RAM_ATTR will be zero initialized.
CONFIG_ESP32S2_TRAX
Use TRAX tracing feature
Found in: Component config > ESP32S2-specific
Espressif Systems 1102
Submit Document Feedback
Release v4.4