Merge branch 'feature/wifi_kconfig_merge' into 'master'

esp_wifi: Merge wpa_supplicant and esp_wifi Kconfig

Closes WIFI-4541 and IDF-1830

See merge request espressif/esp-idf!18998
This commit is contained in:
Jiang Jiang Jian
2023-02-11 07:38:46 +08:00
76 changed files with 769 additions and 742 deletions

View File

@@ -194,11 +194,11 @@ Setting Coexistence Compile-time Options
.. list::
- After writing the coexistence program, you must check :ref:`CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE` option through menuconfig to open coexistence configuration on software, otherwise the coexistence function mentioned above cannot be used.
- After writing the coexistence program, you must check :ref:`CONFIG_ESP_WIFI_SW_COEXIST_ENABLE` option through menuconfig to open coexistence configuration on software, otherwise the coexistence function mentioned above cannot be used.
:esp32: - To ensure better communication performance of Wi-Fi and Bluetooth in the case of coexistence, run the task of the Wi-Fi protocol stack, the task of the Bluetooth Controller and Host protocol stack on different CPUs. You can use :ref:`CONFIG_BTDM_CTRL_PINNED_TO_CORE_CHOICE` and :ref:`CONFIG_BT_BLUEDROID_PINNED_TO_CORE_CHOICE` (or :ref:`CONFIG_BT_NIMBLE_PINNED_TO_CORE_CHOICE`) to put the tasks of the Bluetooth controller and the host protocol stack on the same CPU, and then use :ref:`CONFIG_ESP32_WIFI_TASK_CORE_ID` to place the task of the Wi-Fi protocol stack on another CPU.
:esp32: - To ensure better communication performance of Wi-Fi and Bluetooth in the case of coexistence, run the task of the Wi-Fi protocol stack, the task of the Bluetooth Controller and Host protocol stack on different CPUs. You can use :ref:`CONFIG_BTDM_CTRL_PINNED_TO_CORE_CHOICE` and :ref:`CONFIG_BT_BLUEDROID_PINNED_TO_CORE_CHOICE` (or :ref:`CONFIG_BT_NIMBLE_PINNED_TO_CORE_CHOICE`) to put the tasks of the Bluetooth controller and the host protocol stack on the same CPU, and then use :ref:`CONFIG_ESP_WIFI_TASK_CORE_ID` to place the task of the Wi-Fi protocol stack on another CPU.
:esp32s3: - To ensure better communication performance of Wi-Fi and Bluetooth in the case of coexistence, run the task of the Wi-Fi protocol stack, the task of the Bluetooth Controller and Host protocol stack on different CPUs. You can use :ref:`CONFIG_BT_CTRL_PINNED_TO_CORE_CHOICE` and :ref:`CONFIG_BT_BLUEDROID_PINNED_TO_CORE_CHOICE` (or :ref:`CONFIG_BT_NIMBLE_PINNED_TO_CORE_CHOICE` to put the tasks of the Bluetooth controller and the host protocol stack on the same CPU, and then use :ref:`CONFIG_ESP32_WIFI_TASK_CORE_ID` to place the task of the Wi-Fi protocol stack on another CPU.
:esp32s3: - To ensure better communication performance of Wi-Fi and Bluetooth in the case of coexistence, run the task of the Wi-Fi protocol stack, the task of the Bluetooth Controller and Host protocol stack on different CPUs. You can use :ref:`CONFIG_BT_CTRL_PINNED_TO_CORE_CHOICE` and :ref:`CONFIG_BT_BLUEDROID_PINNED_TO_CORE_CHOICE` (or :ref:`CONFIG_BT_NIMBLE_PINNED_TO_CORE_CHOICE` to put the tasks of the Bluetooth controller and the host protocol stack on the same CPU, and then use :ref:`CONFIG_ESP_WIFI_TASK_CORE_ID` to place the task of the Wi-Fi protocol stack on another CPU.
:esp32: - In the case of coexistence, BLE SCAN may be interrupted by Wi-Fi and Wi-Fi releases RF resources before the end of the current BLE scan window. In order to make BLE acquire RF resources again within the current scan window, you can check the FULL SCAN configuration option through :ref:`CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED`.
@@ -207,14 +207,14 @@ Setting Coexistence Compile-time Options
- You can reduce the memory consumption by configuring the following options on menuconfig.
1) :ref:`CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY`: enable the configuration of dynamic memory for Bluetooth protocol stack.
#) :ref:`CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM`: reduce the number of Wi-Fi static RX buffers.
#) :ref:`CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM`: reduce the number of Wi-Fi dynamic RX buffers.
#) :ref:`CONFIG_ESP32_WIFI_TX_BUFFER`: enable the configuration of dynamic allocation TX buffers.
#) :ref:`CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM`: reduce the number of Wi-Fi dynamic TX buffers.
#) :ref:`CONFIG_ESP32_WIFI_TX_BA_WIN`: reduce the number of Wi-Fi Block Ack TX windows.
#) :ref:`CONFIG_ESP32_WIFI_RX_BA_WIN`: reduce the number of Wi-Fi Block Ack RX windows.
#) :ref:`CONFIG_ESP32_WIFI_MGMT_SBUF_NUM`: reduce the number of Wi-Fi Management Short Buffer.
#) :ref:`CONFIG_ESP32_WIFI_RX_IRAM_OPT`: turning off this configuration option will reduce the IRAM memory by approximately 17 KB.
#) :ref:`CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM`: reduce the number of Wi-Fi static RX buffers.
#) :ref:`CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM`: reduce the number of Wi-Fi dynamic RX buffers.
#) :ref:`CONFIG_ESP_WIFI_TX_BUFFER`: enable the configuration of dynamic allocation TX buffers.
#) :ref:`CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM`: reduce the number of Wi-Fi dynamic TX buffers.
#) :ref:`CONFIG_ESP_WIFI_TX_BA_WIN`: reduce the number of Wi-Fi Block Ack TX windows.
#) :ref:`CONFIG_ESP_WIFI_RX_BA_WIN`: reduce the number of Wi-Fi Block Ack RX windows.
#) :ref:`CONFIG_ESP_WIFI_MGMT_SBUF_NUM`: reduce the number of Wi-Fi Management Short Buffer.
#) :ref:`CONFIG_ESP_WIFI_RX_IRAM_OPT`: turning off this configuration option will reduce the IRAM memory by approximately 17 KB.
#) :ref:`CONFIG_LWIP_TCP_SND_BUF_DEFAULT`: reduce the default TX buffer size for TCP sockets.
#) :ref:`CONFIG_LWIP_TCP_WND_DEFAULT`: reduce the default size of the RX window for TCP sockets.
#) :ref:`CONFIG_LWIP_TCP_RECVMBOX_SIZE`: reduce the size of the TCP receive mailbox.

View File

@@ -406,11 +406,11 @@ Calling ``send()`` or ``sendto()`` repeatedly on a UDP socket may eventually fai
.. only:: esp32
Increasing the number of TX buffers in the :ref:`Wi-Fi <CONFIG_ESP32_WIFI_TX_BUFFER>` or :ref:`Ethernet <CONFIG_ETH_DMA_TX_BUFFER_NUM>` project configuration (as applicable) may also help.
Increasing the number of TX buffers in the :ref:`Wi-Fi <CONFIG_ESP_WIFI_TX_BUFFER>` or :ref:`Ethernet <CONFIG_ETH_DMA_TX_BUFFER_NUM>` project configuration (as applicable) may also help.
.. only:: not esp32 and SOC_WIFI_SUPPORTED
Increasing the number of TX buffers in the :ref:`Wi-Fi <CONFIG_ESP32_WIFI_TX_BUFFER>` project configuration may also help.
Increasing the number of TX buffers in the :ref:`Wi-Fi <CONFIG_ESP_WIFI_TX_BUFFER>` project configuration may also help.
.. _lwip-performance:

View File

@@ -133,7 +133,7 @@ The following options will reduce IRAM usage of some ESP-IDF features:
- Enable :ref:`CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH`. Enabling this option will place snapshot-related functions, such as ``vTaskGetSnapshot`` or ``uxTaskGetSnapshotAll``, in flash.
- Enable :ref:`CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH`. Provided these functions are not (incorrectly) used from ISRs, this option is safe to enable in all configurations.
- Enable :ref:`CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH`. This option is not safe to use if the ISR ringbuf functions are used from an IRAM interrupt context, e.g. if :ref:`CONFIG_UART_ISR_IN_IRAM` is enabled. For the IDF drivers where this is the case you will get an error at run-time when installing the driver in question.
:SOC_WIFI_SUPPORTED: - Disable Wi-Fi options :ref:`CONFIG_ESP32_WIFI_IRAM_OPT` and/or :ref:`CONFIG_ESP32_WIFI_RX_IRAM_OPT`. Disabling these options will free available IRAM at the cost of Wi-Fi performance.
:SOC_WIFI_SUPPORTED: - Disable Wi-Fi options :ref:`CONFIG_ESP_WIFI_IRAM_OPT` and/or :ref:`CONFIG_ESP_WIFI_RX_IRAM_OPT`. Disabling these options will free available IRAM at the cost of Wi-Fi performance.
:esp32c3 or esp32s3: - :ref:`CONFIG_SPI_FLASH_ROM_IMPL` enabling this option will free some IRAM but will mean that esp_flash bugfixes and new flash chip support is not available.
:esp32: - :ref:`CONFIG_SPI_FLASH_ROM_DRIVER_PATCH` disabling this option will free some IRAM but is only available in some flash configurations (see the configuration item help text).
:esp32: - If the application uses PSRAM and is based on ESP32 rev. 3 (ECO3), setting :ref:`CONFIG_ESP32_REV_MIN` to ``3`` will disable PSRAM bug workarounds, saving ~10kB or more of IRAM.

View File

@@ -319,7 +319,7 @@ The following binary size optimizations apply to a particular component or a fun
Wi-Fi
@@@@@
- Disabling :ref:`CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE` will save some Wi-Fi binary size if WPA3 support is not needed. (Note that WPA3 is mandatory for new Wi-Fi device certifications.)
- Disabling :ref:`CONFIG_ESP_WIFI_ENABLE_WPA3_SAE` will save some Wi-Fi binary size if WPA3 support is not needed. (Note that WPA3 is mandatory for new Wi-Fi device certifications.)
- Disabling :ref:`CONFIG_ESP_WIFI_SOFTAP_SUPPORT` will save some Wi-Fi binary size if soft-AP support is not needed.
.. only:: esp32

View File

@@ -181,7 +181,7 @@ Common priorities are:
- FreeRTOS Timer Task to handle FreeRTOS timer callbacks is created when the scheduler initializes and has minimum task priority (1, :ref:`configurable <CONFIG_FREERTOS_TIMER_TASK_PRIORITY>`). This task is pinned to Core 0.
- :doc:`/api-guides/event-handling` system task to manage the default system event loop and execute callbacks has high priority (20, ``ESP_TASK_EVENT_PRIO``) and pinned to Core 0. This configuration is only used if the application calls :cpp:func:`esp_event_loop_create_default`, it's possible to call :cpp:func:`esp_event_loop_create` with a custom task configuration instead.
- :doc:`/api-guides/lwip` TCP/IP task has high priority (18, ``ESP_TASK_TCPIP_PRIO``) and is not pinned to any core (:ref:`configurable<CONFIG_LWIP_TCPIP_TASK_AFFINITY>`).
:SOC_WIFI_SUPPORTED: - :doc:`Wi-Fi Driver </api-guides/wifi>` task has high priority (23) and is pinned to Core 0 by default (:ref:`configurable<CONFIG_ESP32_WIFI_TASK_CORE_ID>`).
:SOC_WIFI_SUPPORTED: - :doc:`Wi-Fi Driver </api-guides/wifi>` task has high priority (23) and is pinned to Core 0 by default (:ref:`configurable<CONFIG_ESP_WIFI_TASK_CORE_ID>`).
:SOC_WIFI_SUPPORTED: - Wi-Fi wpa_supplicant component may create dedicated tasks while the Wi-Fi Protected Setup (WPS), WPA2 EAP-TLS, Device Provisioning Protocol (DPP) or BSS Transition Management (BTM) features are in use. These tasks all have low priority (2) and are not pinned to any core.
:SOC_BT_SUPPORTED: - :doc:`Bluetooth Controller </api-reference/bluetooth/index>` task has high priority (23, ``ESP_TASK_BT_CONTROLLER_PRIO``) and is pinned to Core 0 by default (:ref:`configurable <{IDF_TARGET_CONTROLLER_CORE_CONFIG}>`). The Bluetooth Controller needs to respond to requests with low latency, so it should always be close to the highest priority task assigned to a single CPU.
:SOC_BT_SUPPORTED: - :doc:`NimBLE Bluetooth Host </api-reference/bluetooth/nimble/index>` host task has high priority (21) and is pinned to Core 0 by default (:ref:`configurable <CONFIG_BT_NIMBLE_PINNED_TO_CORE_CHOICE>`).

View File

@@ -2199,7 +2199,7 @@ Wi-Fi AMSDU
.. only:: SOC_SPIRAM_SUPPORTED
{IDF_TARGET_NAME} supports receiving and transmitting AMSDU. AMSDU TX is disabled by default, since enable AMSDU TX need more memory. Select :ref:`CONFIG_ESP32_WIFI_AMSDU_TX_ENABLED` to enable AMSDU Tx feature, it depends on :ref:`CONFIG_SPIRAM`.
{IDF_TARGET_NAME} supports receiving and transmitting AMSDU. AMSDU TX is disabled by default, since enable AMSDU TX need more memory. Select :ref:`CONFIG_ESP_WIFI_AMSDU_TX_ENABLED` to enable AMSDU Tx feature, it depends on :ref:`CONFIG_SPIRAM`.
Wi-Fi Fragment
-------------------------
@@ -2292,24 +2292,24 @@ Increasing the size or number of the buffers mentioned above properly can improv
**RX direction:**
- :ref:`CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM`
- :ref:`CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM`
This parameter indicates the number of DMA buffer at the hardware layer. Increasing this parameter will increase the sender's one-time receiving throughput, thereby improving the Wi-Fi protocol stack ability to handle burst traffic.
- :ref:`CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM`
- :ref:`CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM`
This parameter indicates the number of RX buffer in the Wi-Fi layer. Increasing this parameter will improve the performance of packet reception. This parameter needs to match the RX buffer size of the LwIP layer.
- :ref:`CONFIG_ESP32_WIFI_RX_BA_WIN`
This parameter indicates the size of the AMPDU BA Window at the receiving end. This parameter should be configured to the smaller value between twice of :ref:`CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM` and :ref:`CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM`.
- :ref:`CONFIG_ESP_WIFI_RX_BA_WIN`
This parameter indicates the size of the AMPDU BA Window at the receiving end. This parameter should be configured to the smaller value between twice of :ref:`CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM` and :ref:`CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM`.
- :ref:`CONFIG_LWIP_TCP_WND_DEFAULT`
This parameter represents the RX buffer size of the LwIP layer for each TCP stream. Its value should be configured to the value of WIFI_DYNAMIC_RX_BUFFER_NUM (KB) to reach a high and stable performance. Meanwhile, in case of multiple streams, this value needs to be reduced proportionally.
**TX direction:**
- :ref:`CONFIG_ESP32_WIFI_TX_BUFFER`
- :ref:`CONFIG_ESP_WIFI_TX_BUFFER`
This parameter indicates the type of TX buffer, it is recommended to configure it as a dynamic buffer, which can make full use of memory.
- :ref:`CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM`
- :ref:`CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM`
This parameter indicates the number of TX buffer on the Wi-Fi layer. Increasing this parameter will improve the performance of packet sending. The parameter value needs to match the TX buffer size of the LwIP layer.
- :ref:`CONFIG_LWIP_TCP_SND_BUF_DEFAULT`
@@ -2319,10 +2319,10 @@ Increasing the size or number of the buffers mentioned above properly can improv
.. only:: esp32 or esp32s2
- :ref:`CONFIG_ESP32_WIFI_IRAM_OPT`
- :ref:`CONFIG_ESP_WIFI_IRAM_OPT`
If this option is enabled, some Wi-Fi functions are moved to IRAM, improving throughput. This increases IRAM usage by 15 kB.
- :ref:`CONFIG_ESP32_WIFI_RX_IRAM_OPT`
- :ref:`CONFIG_ESP_WIFI_RX_IRAM_OPT`
If this option is enabled, some Wi-Fi RX functions are moved to IRAM, improving throughput. This increases IRAM usage by 16 kB.
- :ref:`CONFIG_LWIP_IRAM_OPTIMIZATION`
@@ -2886,7 +2886,7 @@ The parameters not mentioned in the following table should be set to the default
Using PSRAM
++++++++++++++++++++++++++++
PSRAM is generally used when the application takes up a lot of memory. In this mode, the :ref:`CONFIG_ESP32_WIFI_TX_BUFFER` is forced to be static. :ref:`CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM` indicates the number of DMA buffers at the hardware layer, and increasing this parameter can improve performance.
PSRAM is generally used when the application takes up a lot of memory. In this mode, the :ref:`CONFIG_ESP_WIFI_TX_BUFFER` is forced to be static. :ref:`CONFIG_ESP_WIFI_STATIC_TX_BUFFER_NUM` indicates the number of DMA buffers at the hardware layer, and increasing this parameter can improve performance.
The following are the recommended ranks for using PSRAM:
.. only:: esp32

View File

@@ -194,11 +194,11 @@ BLE MESH 共存状态描述
.. list::
- 在完成共存程序编写的时候,您必须通过 menuconfig 选择 :ref:`CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE` 打开软件共存配置选项,否则就无法使用上文中提到的共存功能。
- 在完成共存程序编写的时候,您必须通过 menuconfig 选择 :ref:`CONFIG_ESP_WIFI_SW_COEXIST_ENABLE` 打开软件共存配置选项,否则就无法使用上文中提到的共存功能。
:esp32: - 为了在共存情况下获得更好的 Wi-Fi 和蓝牙的通信性能,建议将 Wi-Fi 协议栈的 task 和蓝牙 Controller 以及 Host 协议栈的 task 运行在不同的 CPU 上。您可以通过 :ref:`CONFIG_BTDM_CTRL_PINNED_TO_CORE_CHOICE` 和 :ref:`CONFIG_BT_BLUEDROID_PINNED_TO_CORE_CHOICE` (或者 :ref:`CONFIG_BT_NIMBLE_PINNED_TO_CORE_CHOICE` )选择将蓝牙 controller 以及 host 协议栈的 task 放在同一个 CPU 上,再通过 :ref:`CONFIG_ESP32_WIFI_TASK_CORE_ID` 选择将 Wi-Fi 协议栈 task 放在另一个 CPU 上。
:esp32: - 为了在共存情况下获得更好的 Wi-Fi 和蓝牙的通信性能,建议将 Wi-Fi 协议栈的 task 和蓝牙 Controller 以及 Host 协议栈的 task 运行在不同的 CPU 上。您可以通过 :ref:`CONFIG_BTDM_CTRL_PINNED_TO_CORE_CHOICE` 和 :ref:`CONFIG_BT_BLUEDROID_PINNED_TO_CORE_CHOICE` (或者 :ref:`CONFIG_BT_NIMBLE_PINNED_TO_CORE_CHOICE` )选择将蓝牙 controller 以及 host 协议栈的 task 放在同一个 CPU 上,再通过 :ref:`CONFIG_ESP_WIFI_TASK_CORE_ID` 选择将 Wi-Fi 协议栈 task 放在另一个 CPU 上。
:esp32s3: - 为了在共存情况下获得更好的 Wi-Fi 和蓝牙的通信性能,建议将 Wi-Fi 协议栈的 task 和蓝牙 Controller 以及 Host 协议栈的 task 运行在不同的 CPU 上,您可以通过 :ref:`CONFIG_BT_CTRL_PINNED_TO_CORE_CHOICE` 和 :ref:`CONFIG_BT_BLUEDROID_PINNED_TO_CORE_CHOICE` (或者 :ref:`CONFIG_BT_NIMBLE_PINNED_TO_CORE_CHOICE` )选择将蓝牙 controller 以及 host 协议栈的 task 放在同一个 CPU 上,再通过 :ref:`CONFIG_ESP32_WIFI_TASK_CORE_ID` 选择将 Wi-Fi 协议栈 task 放在另一个 CPU 上。
:esp32s3: - 为了在共存情况下获得更好的 Wi-Fi 和蓝牙的通信性能,建议将 Wi-Fi 协议栈的 task 和蓝牙 Controller 以及 Host 协议栈的 task 运行在不同的 CPU 上,您可以通过 :ref:`CONFIG_BT_CTRL_PINNED_TO_CORE_CHOICE` 和 :ref:`CONFIG_BT_BLUEDROID_PINNED_TO_CORE_CHOICE` (或者 :ref:`CONFIG_BT_NIMBLE_PINNED_TO_CORE_CHOICE` )选择将蓝牙 controller 以及 host 协议栈的 task 放在同一个 CPU 上,再通过 :ref:`CONFIG_ESP_WIFI_TASK_CORE_ID` 选择将 Wi-Fi 协议栈 task 放在另一个 CPU 上。
:esp32: - 在共存情况下 BLE SCAN 可能会被 Wi-Fi 打断且 Wi-Fi 在当前的 BLE scan window 结束前释放了 RF 资源。为了使 BLE 在当前的 scan window 内再次获取 RF 资源,您可以通过 :ref:`CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED` 选择打开 FULL SCAN 配置选项。
@@ -207,14 +207,14 @@ BLE MESH 共存状态描述
- 您可以通过修改以下 menuconfig 选项,以减小内存开销:
1) :ref:`CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY` 选择打开蓝牙协议栈动态内存配置选项。
#) :ref:`CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM` 选择减少 Wi-Fi 静态接收数据缓冲区的数量。
#) :ref:`CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM` 选择减少 Wi-Fi 动态接收数据缓冲区的数量。
#) :ref:`CONFIG_ESP32_WIFI_TX_BUFFER` 选择使用动态分配发送数据缓冲区配置选项。
#) :ref:`CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM` 选择减少 Wi-Fi 动态发送数据缓冲区的数量。
#) :ref:`CONFIG_ESP32_WIFI_TX_BA_WIN` 选择减少 Wi-Fi Block Ack TX 窗口的数量。
#) :ref:`CONFIG_ESP32_WIFI_RX_BA_WIN` 选择减少 Wi-Fi Block Ack RX 窗口的数量。
#) :ref:`CONFIG_ESP32_WIFI_MGMT_SBUF_NUM` 选择减少 Wi-Fi 管理短缓冲区的数量。
#) :ref:`CONFIG_ESP32_WIFI_RX_IRAM_OPT` 选择关闭此配置选项,关闭此配置选项将会减少大约 17 KB 的 IRAM 内存。
#) :ref:`CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM` 选择减少 Wi-Fi 静态接收数据缓冲区的数量。
#) :ref:`CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM` 选择减少 Wi-Fi 动态接收数据缓冲区的数量。
#) :ref:`CONFIG_ESP_WIFI_TX_BUFFER` 选择使用动态分配发送数据缓冲区配置选项。
#) :ref:`CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM` 选择减少 Wi-Fi 动态发送数据缓冲区的数量。
#) :ref:`CONFIG_ESP_WIFI_TX_BA_WIN` 选择减少 Wi-Fi Block Ack TX 窗口的数量。
#) :ref:`CONFIG_ESP_WIFI_RX_BA_WIN` 选择减少 Wi-Fi Block Ack RX 窗口的数量。
#) :ref:`CONFIG_ESP_WIFI_MGMT_SBUF_NUM` 选择减少 Wi-Fi 管理短缓冲区的数量。
#) :ref:`CONFIG_ESP_WIFI_RX_IRAM_OPT` 选择关闭此配置选项,关闭此配置选项将会减少大约 17 KB 的 IRAM 内存。
#) :ref:`CONFIG_LWIP_TCP_SND_BUF_DEFAULT` 选择减小 TCP 套接字默认发送缓存区大小。
#) :ref:`CONFIG_LWIP_TCP_WND_DEFAULT` 选择减小 TCP 套接字默认接收窗口的大小。
#) :ref:`CONFIG_LWIP_TCP_RECVMBOX_SIZE` 选择减小 TCP 接收邮箱的大小。

View File

@@ -2199,7 +2199,7 @@ Wi-Fi AMSDU
.. only:: SOC_SPIRAM_SUPPORTED
{IDF_TARGET_NAME} 支持接收和发送 AMSDU。开启 AMSDU 发送比较消耗内存,默认不开启 AMSDU 发送。可通过选项 :ref:`CONFIG_ESP32_WIFI_AMSDU_TX_ENABLED` 使能 AMSDU 发送功能, 但是使能 AMSDU 发送依赖于 :ref:`CONFIG_SPIRAM`
{IDF_TARGET_NAME} 支持接收和发送 AMSDU。开启 AMSDU 发送比较消耗内存,默认不开启 AMSDU 发送。可通过选项 :ref:`CONFIG_ESP_WIFI_AMSDU_TX_ENABLED` 使能 AMSDU 发送功能, 但是使能 AMSDU 发送依赖于 :ref:`CONFIG_SPIRAM`
Wi-Fi 分片
-------------------------
@@ -2292,24 +2292,24 @@ Wi-Fi 使用的堆内存峰值是 Wi-Fi 驱动程序 **理论上消耗的最大
**接收数据方向:**
- :ref:`CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM`
- :ref:`CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM`
该参数表示硬件层的 DMA 缓冲区数量。提高该参数将增加发送方的一次性接收吞吐量,从而提高 Wi-Fi 协议栈处理突发流量的能力。
- :ref:`CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM`
- :ref:`CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM`
该参数表示 Wi-Fi 层中接收数据缓冲区的数量。提高该参数可以增强数据包的接收性能。该参数需要与 LWIP 层的接收数据缓冲区大小相匹配。
- :ref:`CONFIG_ESP32_WIFI_RX_BA_WIN`
该参数表示接收端 AMPDU BA 窗口的大小,应配置为 :ref:`CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM`:ref:`CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM` 的二倍数值中较小的数值。
- :ref:`CONFIG_ESP_WIFI_RX_BA_WIN`
该参数表示接收端 AMPDU BA 窗口的大小,应配置为 :ref:`CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM`:ref:`CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM` 的二倍数值中较小的数值。
- :ref:`CONFIG_LWIP_TCP_WND_DEFAULT`
该参数表示 LWIP 层用于每个 TCP 流的的接收数据缓冲区大小,应配置为 WIFI_DYNAMIC_RX_BUFFER_NUM (KB) 的值,从而实现高稳定性能。同时,在有多个流的情况下,应相应降低该参数值。
**发送数据方向:**
- :ref:`CONFIG_ESP32_WIFI_TX_BUFFER`
- :ref:`CONFIG_ESP_WIFI_TX_BUFFER`
该参数表示发送数据缓冲区的类型,建议配置为动态缓冲区,该配置可以充分利用内存。
- :ref:`CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM`
- :ref:`CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM`
该参数表示 Wi-Fi 层发送数据缓冲区数量。提高该参数可以增强数据包发送的性能。该参数值需要与 LWIP 层的发送数据缓冲区大小相匹配。
- :ref:`CONFIG_LWIP_TCP_SND_BUF_DEFAULT`
@@ -2319,10 +2319,10 @@ Wi-Fi 使用的堆内存峰值是 Wi-Fi 驱动程序 **理论上消耗的最大
.. only:: esp32 or esp32s2
- :ref:`CONFIG_ESP32_WIFI_IRAM_OPT`
- :ref:`CONFIG_ESP_WIFI_IRAM_OPT`
如果使能该选项,一些 Wi-Fi 功能将被移至 IRAM从而提高吞吐量IRAM 使用量将增加 15 kB。
- :ref:`CONFIG_ESP32_WIFI_RX_IRAM_OPT`
- :ref:`CONFIG_ESP_WIFI_RX_IRAM_OPT`
如果使能该选项,一些 Wi-Fi 接收数据功能将被移至 IRAM从而提高吞吐量IRAM 使用量将增加 16 kB。
- :ref:`CONFIG_LWIP_IRAM_OPTIMIZATION`
@@ -2886,7 +2886,7 @@ Wi-Fi 使用的堆内存峰值是 Wi-Fi 驱动程序 **理论上消耗的最大
使用 PSRAM
++++++++++++++++++++++++++++
PSRAM 一般在应用程序占用大量内存时使用。在该模式下,:ref:`CONFIG_ESP32_WIFI_TX_BUFFER` 被强制为静态。:ref:`CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM` 表示硬件层 DMA 缓冲区数量,提高这一参数可以增强性能。
PSRAM 一般在应用程序占用大量内存时使用。在该模式下,:ref:`CONFIG_ESP_WIFI_TX_BUFFER` 被强制为静态。:ref:`CONFIG_ESP_WIFI_STATIC_TX_BUFFER_NUM` 表示硬件层 DMA 缓冲区数量,提高这一参数可以增强性能。
以下是使用 PSRAM 时的推荐等级。
.. only:: esp32