esp_wifi: Put some rx code to iram

This commit is contained in:
xiehang 2019-10-25 16:44:48 +08:00 committed by bot
parent d57890cdff
commit 5e7f43f3d1
7 changed files with 38 additions and 2 deletions

View file

@ -48,6 +48,10 @@ entries:
entries: entries:
.wifi0iram+ .wifi0iram+
[sections:wifi_rx_iram]
entries:
.wifirxiram+
[scheme:default] [scheme:default]
entries: entries:
if APP_BUILD_USE_FLASH_SECTIONS = y: if APP_BUILD_USE_FLASH_SECTIONS = y:
@ -66,6 +70,7 @@ entries:
rtc_rodata -> rtc_data rtc_rodata -> rtc_data
rtc_bss -> rtc_bss rtc_bss -> rtc_bss
wifi_iram -> flash_text wifi_iram -> flash_text
wifi_rx_iram -> flash_text
[scheme:rtc] [scheme:rtc]
entries: entries:
@ -91,3 +96,7 @@ entries:
[scheme:wifi_iram] [scheme:wifi_iram]
entries: entries:
wifi_iram -> iram0_text wifi_iram -> iram0_text
[scheme:wifi_rx_iram]
entries:
wifi_rx_iram -> iram0_text

View file

@ -48,6 +48,10 @@ entries:
entries: entries:
.wifi0iram+ .wifi0iram+
[sections:wifi_rx_iram]
entries:
.wifirxiram+
[scheme:default] [scheme:default]
entries: entries:
text -> flash_text text -> flash_text
@ -62,6 +66,7 @@ entries:
rtc_rodata -> rtc_data rtc_rodata -> rtc_data
rtc_bss -> rtc_bss rtc_bss -> rtc_bss
wifi_iram -> flash_text wifi_iram -> flash_text
wifi_rx_iram -> flash_text
[scheme:rtc] [scheme:rtc]
entries: entries:
@ -87,3 +92,7 @@ entries:
[scheme:wifi_iram] [scheme:wifi_iram]
entries: entries:
wifi_iram -> iram0_text wifi_iram -> iram0_text
[scheme:wifi_rx_iram]
entries:
wifi_rx_iram -> iram0_text

View file

@ -309,6 +309,7 @@ menu "Wi-Fi"
default n default n
config ESP32_WIFI_IRAM_OPT config ESP32_WIFI_IRAM_OPT
depends on !(BT_ENABLED && ESP32_SPIRAM_SUPPORT)
bool "WiFi IRAM speed optimization" bool "WiFi IRAM speed optimization"
default y default y
help help
@ -316,6 +317,15 @@ menu "Wi-Fi"
When this option is disabled, more than 10Kbytes of IRAM memory will be saved When this option is disabled, more than 10Kbytes of IRAM memory will be saved
but Wi-Fi throughput will be reduced. but Wi-Fi throughput will be reduced.
config ESP32_WIFI_RX_IRAM_OPT
depends on !(BT_ENABLED && ESP32_SPIRAM_SUPPORT)
bool "WiFi RX IRAM speed optimization"
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 endmenu # Wi-Fi
menu "PHY" menu "PHY"

@ -1 +1 @@
Subproject commit 99eb8ac56fe651e7116744e1704e02d0d2828d88 Subproject commit f3c39df1c428b065e05a431c6f8685790531baf5

View file

@ -14,8 +14,14 @@ entries:
if ESP32_WIFI_IRAM_OPT = y: if ESP32_WIFI_IRAM_OPT = y:
* (wifi_iram) * (wifi_iram)
if ESP32_WIFI_RX_IRAM_OPT = y:
* (wifi_rx_iram)
[mapping:net80211] [mapping:net80211]
archive: libnet80211.a archive: libnet80211.a
entries: entries:
if ESP32_WIFI_IRAM_OPT = y: if ESP32_WIFI_IRAM_OPT = y:
* (wifi_iram) * (wifi_iram)
if ESP32_WIFI_RX_IRAM_OPT = y:
* (wifi_rx_iram)

View file

@ -2,3 +2,4 @@ TEST_EXCLUDE_COMPONENTS=libsodium bt app_update driver esp32 spi_flash
CONFIG_ESP32_SPIRAM_SUPPORT=y CONFIG_ESP32_SPIRAM_SUPPORT=y
CONFIG_ESP_INT_WDT_TIMEOUT_MS=800 CONFIG_ESP_INT_WDT_TIMEOUT_MS=800
CONFIG_SPIRAM_OCCUPY_NO_HOST=y CONFIG_SPIRAM_OCCUPY_NO_HOST=y
CONFIG_ESP32_WIFI_RX_IRAM_OPT=n

View file

@ -2,3 +2,4 @@ TEST_COMPONENTS=driver esp32 spi_flash
CONFIG_ESP32_SPIRAM_SUPPORT=y CONFIG_ESP32_SPIRAM_SUPPORT=y
CONFIG_ESP_INT_WDT_TIMEOUT_MS=800 CONFIG_ESP_INT_WDT_TIMEOUT_MS=800
CONFIG_SPIRAM_OCCUPY_NO_HOST=y CONFIG_SPIRAM_OCCUPY_NO_HOST=y
CONFIG_ESP32_WIFI_RX_IRAM_OPT=n