From e5773cc2fe36778f6d0c89c6accc9deee4a61b61 Mon Sep 17 00:00:00 2001 From: xiehang Date: Fri, 25 Oct 2019 16:44:48 +0800 Subject: [PATCH] esp_wifi: Put some rx code to iram and update phy4180 --- components/esp32/ld/esp32_fragments.lf | 9 +++++++++ components/esp_wifi/Kconfig | 10 ++++++++++ components/esp_wifi/lib_esp32 | 2 +- components/esp_wifi/linker.lf | 6 ++++++ tools/unit-test-app/configs/psram | 3 ++- tools/unit-test-app/configs/psram_2 | 1 + 6 files changed, 29 insertions(+), 2 deletions(-) diff --git a/components/esp32/ld/esp32_fragments.lf b/components/esp32/ld/esp32_fragments.lf index 932197caf..83a282dcb 100644 --- a/components/esp32/ld/esp32_fragments.lf +++ b/components/esp32/ld/esp32_fragments.lf @@ -48,6 +48,10 @@ entries: entries: .wifi0iram+ +[sections:wifi_rx_iram] +entries: + .wifirxiram+ + [scheme:default] entries: text -> flash_text @@ -62,6 +66,7 @@ entries: rtc_rodata -> rtc_data rtc_bss -> rtc_bss wifi_iram -> flash_text + wifi_rx_iram -> flash_text [scheme:rtc] entries: @@ -87,3 +92,7 @@ entries: [scheme:wifi_iram] entries: wifi_iram -> iram0_text + +[scheme:wifi_rx_iram] +entries: + wifi_rx_iram -> iram0_text diff --git a/components/esp_wifi/Kconfig b/components/esp_wifi/Kconfig index 2b19873cb..8e1430578 100644 --- a/components/esp_wifi/Kconfig +++ b/components/esp_wifi/Kconfig @@ -310,12 +310,22 @@ menu "Wi-Fi" config ESP32_WIFI_IRAM_OPT bool "WiFi IRAM speed optimization" + default n if (BT_ENABLED && ESP32_SPIRAM_SUPPORT) default y help Select this option to place frequently called Wi-Fi library functions in IRAM. When this option is disabled, more than 10Kbytes of IRAM memory will be saved but Wi-Fi throughput will be reduced. + config ESP32_WIFI_RX_IRAM_OPT + bool "WiFi RX IRAM speed optimization" + default n if (BT_ENABLED && ESP32_SPIRAM_SUPPORT) + default y + help + Select this option to place frequently called Wi-Fi library RX functions in IRAM. + When this option is disabled, more than 17Kbytes of IRAM memory will be saved + but Wi-Fi performance will be reduced. + endmenu # Wi-Fi menu "PHY" diff --git a/components/esp_wifi/lib_esp32 b/components/esp_wifi/lib_esp32 index da98b13f1..dff38c7da 160000 --- a/components/esp_wifi/lib_esp32 +++ b/components/esp_wifi/lib_esp32 @@ -1 +1 @@ -Subproject commit da98b13f1dd34442f56cf5b26e4e778132fd9a45 +Subproject commit dff38c7da07177f5b331d5ab99116ce35e41cc7a diff --git a/components/esp_wifi/linker.lf b/components/esp_wifi/linker.lf index a322d395a..a520fc14e 100644 --- a/components/esp_wifi/linker.lf +++ b/components/esp_wifi/linker.lf @@ -13,9 +13,15 @@ archive: libpp.a entries: if ESP32_WIFI_IRAM_OPT = y: * (wifi_iram) + + if ESP32_WIFI_RX_IRAM_OPT = y: + * (wifi_rx_iram) [mapping:net80211] archive: libnet80211.a entries: if ESP32_WIFI_IRAM_OPT = y: * (wifi_iram) + + if ESP32_WIFI_RX_IRAM_OPT = y: + * (wifi_rx_iram) diff --git a/tools/unit-test-app/configs/psram b/tools/unit-test-app/configs/psram index 33895d702..c355f16c3 100644 --- a/tools/unit-test-app/configs/psram +++ b/tools/unit-test-app/configs/psram @@ -1,3 +1,4 @@ TEST_EXCLUDE_COMPONENTS=libsodium bt app_update driver esp32 spi_flash CONFIG_ESP32_SPIRAM_SUPPORT=y -CONFIG_SPIRAM_OCCUPY_NO_HOST=y \ No newline at end of file +CONFIG_SPIRAM_OCCUPY_NO_HOST=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=n diff --git a/tools/unit-test-app/configs/psram_2 b/tools/unit-test-app/configs/psram_2 index 94ce7585a..fa52ac276 100644 --- a/tools/unit-test-app/configs/psram_2 +++ b/tools/unit-test-app/configs/psram_2 @@ -1,3 +1,4 @@ TEST_COMPONENTS=driver esp32 spi_flash CONFIG_ESP32_SPIRAM_SUPPORT=y CONFIG_SPIRAM_OCCUPY_NO_HOST=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=n