diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk index cd517e75b4..a67c8e38e4 100644 --- a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk @@ -3,6 +3,6 @@ CIRCUITPY_CREATION_ID = 0x00C30001 IDF_TARGET = esp32c3 -CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk index cec65ead85..2315d4e20f 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk @@ -9,5 +9,9 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 UF2_BOOTLOADER = 0 diff --git a/ports/espressif/common-hal/wifi/__init__.c b/ports/espressif/common-hal/wifi/__init__.c index 769ed8ab04..970eb8eb04 100644 --- a/ports/espressif/common-hal/wifi/__init__.c +++ b/ports/espressif/common-hal/wifi/__init__.c @@ -190,7 +190,8 @@ void common_hal_wifi_init(bool user_initiated) { &self->handler_instance_got_ip)); wifi_init_config_t config = WIFI_INIT_CONFIG_DEFAULT(); - #ifdef CONFIG_IDF_TARGET_ESP32 + #ifdef CONFIG_ESP32_WIFI_NVS_ENABLED + // Generally we don't use this because we store ssid and passwords ourselves in the filesystem. esp_err_t err = nvs_flash_init(); if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { // NVS partition was truncated and needs to be erased @@ -210,7 +211,7 @@ void common_hal_wifi_init(bool user_initiated) { if (gc_alloc_possible()) { raise_esp_error(result); } - ESP_LOGE(TAG, "WiFi error code: %d", result); + ESP_LOGE(TAG, "WiFi error code: %x", result); return; } // set station mode to avoid the default SoftAP diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults index 1a47619e52..a41a780e68 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults @@ -49,6 +49,15 @@ CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y # end of Driver Configurations +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 +# CONFIG_ESP32_WIFI_NVS_ENABLED is not set +# end of Wi-Fi + # # Newlib # diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index c13240cff0..2bfd87be1e 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -23,6 +23,7 @@ CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 # end of Memory Settings CONFIG_BT_NIMBLE_EXT_ADV=y +# CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV is not set # end of NimBLE Options # diff --git a/supervisor/shared/web_workflow/web_workflow.c b/supervisor/shared/web_workflow/web_workflow.c index 2a8133a562..ecf83b8bcb 100644 --- a/supervisor/shared/web_workflow/web_workflow.c +++ b/supervisor/shared/web_workflow/web_workflow.c @@ -347,8 +347,7 @@ bool supervisor_start_web_workflow(bool reload) { #if CIRCUITPY_MDNS // Try to start MDNS if the user deinited it. if (mdns.base.type != &mdns_server_type || - common_hal_mdns_server_deinited(&mdns) || - reload) { // Always reconstruct on reload, since we don't know if the net changed. + common_hal_mdns_server_deinited(&mdns)) { mdns_server_construct(&mdns, true); mdns.base.type = &mdns_server_type; if (!common_hal_mdns_server_deinited(&mdns)) {