10000 Switch to using SPIRAM through caps_alloc · rsbohn/circuitpython@8ceeb4d · GitHub
[go: up one dir, main page]

Skip to content

Commit 8ceeb4d

Browse files
committed
Switch to using SPIRAM through caps_alloc
We used to default to `malloc()` using SPIRAM but it disables dynamic WiFi TX buffers. The increased static buffer allocation prevents MBEDTLS from allocating everything it needs. So, switch the IDF to SPIRAM through caps_alloc only. This is pretty much what we do in CP8 except we no longer need to explicitly give the IDF SPIRAM memory to use. Fixes adafruit#8682 (again)
1 parent d2f9867 commit 8ceeb4d

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y
4444
# Wi-Fi
4545
#
4646
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=4
47-
CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=16
4847
CONFIG_ESP_WIFI_RX_BA_WIN=4
4948
# end of Wi-Fi
5049

ports/espressif/esp-idf-config/sdkconfig-psram.defaults

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
# ESP PSRAM
99
#
1010
CONFIG_SPIRAM=y
11+
#
12+
# SPI RAM config
13+
#
14+
CONFIG_SPIRAM_USE_CAPS_ALLOC=y
15+
# end of SPI RAM config
16+
1117
# end of ESP PSRAM
1218

1319
#

ports/espressif/esp-idf-config/sdkconfig.defaults

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048
6666
#
6767
# mbedTLS v3.x related
6868
#
69+
CONFIG_MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH=y
6970
# CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE is not set
7071
# end of mbedTLS v3.x related
7172

0 commit comments

Comments
 (0)
0