From b9ffeb8743a22773518fbc52878758b5c6a3c8b3 Mon Sep 17 00:00:00 2001 From: zhangyanjiao Date: Wed, 22 Oct 2025 19:24:29 +0800 Subject: [PATCH 01/12] fix(wifi/espnow): fix the crash issue when using espnow off channel tx --- components/esp_wifi/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 21eacc3229..55dbefb577 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 21eacc3229fba6ca5e2c8a92062184b53db65651 +Subproject commit 55dbefb5778c45a543e52033ec644ebdd6f10cba From 3a4290659315ec639e213c1bfbec95f46a063788 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Mon, 27 Oct 2025 10:40:18 +0800 Subject: [PATCH 02/12] fix(wifi): fix fragment issue with wpa tkip encryption --- components/esp_wifi/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 55dbefb577..694641c062 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 55dbefb5778c45a543e52033ec644ebdd6f10cba +Subproject commit 694641c0620dad35e984967c5a29e562c7cfbd33 From 69fc90d10131ebbad6f3b125373d1e29a8ec175a Mon Sep 17 00:00:00 2001 From: yinqingzhao Date: Tue, 28 Oct 2025 20:55:19 +0800 Subject: [PATCH 03/12] fix(wifi): fix some wifi bugs related to bandwidth, twt and regdomain --- components/esp_rom/esp32c2/ld/esp32c2.rom.ld | 2 +- components/esp_wifi/lib | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index 8808b00589..ed529c3aeb 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -948,7 +948,7 @@ ieee80211_getcapinfo = 0x40002130; /* sta_rx_csa = 0x40002134; */ /* sta_recv_sa_query_resp = 0x40002144; */ ieee80211_set_max_rate = 0x4000214c; -ic_set_sta = 0x40002150; +//ic_set_sta = 0x40002150; //ieee80211_parse_wpa = 0x40002158; ieee80211_add_assoc_req_ies = 0x40002160; ieee80211_add_probe_req_ies = 0x40002164; diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 694641c062..618b4591a2 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 694641c0620dad35e984967c5a29e562c7cfbd33 +Subproject commit 618b4591a2681f121f1257acca4bfb28d4c1510b From 7df62e6fd7c598a3fa0b181bd50c00e33c62f6b1 Mon Sep 17 00:00:00 2001 From: sibeibei Date: Thu, 6 Nov 2025 19:08:57 +0800 Subject: [PATCH 04/12] fix(wifi): fix issue that disarm send wake null timer donot take effect --- components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld | 2 +- components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld | 2 +- components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld | 2 +- components/esp_wifi/lib | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld index 6742c76aba..3a0dafc1e4 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld @@ -156,7 +156,7 @@ systimer_hal_set_tick_rate_ops = 0x40002eac; /* Functions */ sta_reset_beacon_timeout = 0x40003024; ieee80211_post_hmac_tx = 0x40003028; -sta_rx_eapol = 0x4000302c; +//sta_rx_eapol = 0x4000302c; /* Data (.data, .bss, .rodata) */ len_dh_ie_ptr = 0x3fcdfa6c; g_authmode_threshold_failure_ptr = 0x3fcdfa68; diff --git a/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld b/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld index b10a95bf25..b83061f0c5 100644 --- a/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld +++ b/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld @@ -66,7 +66,7 @@ wifi_rf_phy_disable = 0x40000bc8; wifi_rf_phy_enable = 0x40000bcc; wifi_is_started = 0x40000bd0; /*sta_input = 0x40000bd4;*/ -sta_rx_eapol = 0x40000bd8; +//sta_rx_eapol = 0x40000bd8; //sta_reset_beacon_timeout = 0x40000bdc; sta_get_beacon_timeout = 0x40000be0; ampdu_process_multicast_address_qos_frame = 0x40000be4; diff --git a/components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld b/components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld index 93c0457081..4abb61d6e5 100644 --- a/components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld +++ b/components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld @@ -62,7 +62,7 @@ wifi_rf_phy_disable = 0x40000b30; wifi_rf_phy_enable = 0x40000b34; wifi_is_started = 0x40000b38; /*sta_input = 0x40000b3c;*/ -sta_rx_eapol = 0x40000b40; +//sta_rx_eapol = 0x40000b40; //sta_reset_beacon_timeout = 0x40000b44; sta_get_beacon_timeout = 0x40000b48; ampdu_process_multicast_address_qos_frame = 0x40000b4c; diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 618b4591a2..77e8ca103a 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 618b4591a2681f121f1257acca4bfb28d4c1510b +Subproject commit 77e8ca103ac08cc603792ad4818864a09a5c6557 From ccdfb1af1cb467e29dbc4fa65c82ab3a51f8df83 Mon Sep 17 00:00:00 2001 From: yinqingzhao Date: Wed, 12 Nov 2025 13:27:14 +0800 Subject: [PATCH 05/12] feat(wifi): avoid disconnect when set band mode and fix some wifi bugs --- components/esp_wifi/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 77e8ca103a..647a1c731e 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 77e8ca103ac08cc603792ad4818864a09a5c6557 +Subproject commit 647a1c731ec20e9e609514a49aa15a5ba88d7d4e From 841d56c49d91fdda330ba8654b4e7013f7897e44 Mon Sep 17 00:00:00 2001 From: Akshat Agrawal Date: Tue, 11 Nov 2025 12:24:07 +0530 Subject: [PATCH 06/12] bugfix(wifi): Re-calibrate FTM for ESP32-C5 (ECO2) --- components/esp_wifi/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 647a1c731e..d824377ea6 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 647a1c731ec20e9e609514a49aa15a5ba88d7d4e +Subproject commit d824377ea65988d44216e4974ac1fa8d0a30c457 From ae60558f539c8edbb8ef2c6975671e0361332660 Mon Sep 17 00:00:00 2001 From: Akshat Agrawal Date: Sun, 16 Nov 2025 02:05:32 +0530 Subject: [PATCH 07/12] bugfix(wifi): Add the termination dialog token in ASAP FTM 1. Increase the dwell time for Off-chan FTM 2. Perform the Off-Chan FTM in 20Mhz --- components/esp_wifi/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index d824377ea6..40ce9cc0b7 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit d824377ea65988d44216e4974ac1fa8d0a30c457 +Subproject commit 40ce9cc0b772e66678b61e4f17bd00599f4a8a9a From 13d505f267c286dd1b50caea1daf1c399becbb21 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Wed, 19 Mar 2025 19:34:29 +0800 Subject: [PATCH 08/12] fix(wifi): fix wifi init fail issue Closes https://github.com/espressif/esp-idf/issues/13643 --- components/esp_wifi/src/wifi_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/esp_wifi/src/wifi_init.c b/components/esp_wifi/src/wifi_init.c index 2bf79c6f9e..590498341d 100644 --- a/components/esp_wifi/src/wifi_init.c +++ b/components/esp_wifi/src/wifi_init.c @@ -337,7 +337,8 @@ static esp_err_t esp_wifi_psram_check(const wifi_init_config_t *config) esp_err_t esp_wifi_init(const wifi_init_config_t *config) { if (s_wifi_inited) { - return ESP_OK; + ESP_LOGE(TAG, "Failed to init, WiFi is initialized by esp_wifi_init"); + return ESP_ERR_INVALID_STATE; } esp_err_t result = ESP_OK; From bfdbe6cd86195839de7cd161f033e6546cf84f77 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Tue, 4 Nov 2025 14:44:32 +0800 Subject: [PATCH 09/12] fix(wifi): add migration guides for esp_wifi_init --- docs/en/migration-guides/release-6.x/6.0/wifi.rst | 2 ++ docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/en/migration-guides/release-6.x/6.0/wifi.rst b/docs/en/migration-guides/release-6.x/6.0/wifi.rst index bf81351511..1cdb5d2ec6 100644 --- a/docs/en/migration-guides/release-6.x/6.0/wifi.rst +++ b/docs/en/migration-guides/release-6.x/6.0/wifi.rst @@ -61,3 +61,5 @@ The following Wi-Fi functions have been modified. - **Off-Channel Operations:** - The structure :cpp:struct:`wifi_action_tx_req_t` now includes a ``bssid`` field that is placed in Address3 of the transmitted action frame. Initialise this field explicitly; leaving it all zeros retains the previous behaviour where the Wi-Fi driver inserts the broadcast address, so frames do not carry unintended BSSID values. - The structure :cpp:struct:`wifi_roc_req_t` now includes an ``allow_broadcast`` flag that controls whether broadcast and multicast action frames are passed to the ``rx_cb`` callback during remain-on-channel operations. Existing applications should review the default ``false`` value and enable it when discovery of broadcast peers is required. Frames whose Address3/BSSID is already broadcast continue to reach the callback even when ``allow_broadcast`` remains ``false``. + +- **Wi-Fi Initialization:** If the Wi-Fi driver has already been initialized by function `esp_wifi_init`, calling the function `esp_wifi_init` again will not reinitialize the driver and will return `ESP_ERR_INVALID_STATE` instead of `ESP_OK`. diff --git a/docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst b/docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst index 68cb03ad4c..c1547b1af6 100644 --- a/docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst +++ b/docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst @@ -61,3 +61,5 @@ Wi-Fi - **离信道操作:** - 结构体 :cpp:struct:`wifi_action_tx_req_t` 新增 ``bssid`` 字段,该字段会写入发送动作帧的 Address3。请显式初始化该字段;保持全零时将沿用之前的行为,由 Wi-Fi 驱动填入广播地址,从而避免帧携带意外的 BSSID。 - 结构体 :cpp:struct:`wifi_roc_req_t` 新增 ``allow_broadcast`` 标志,用于控制在驻留信道期间是否将广播/组播动作帧传递给 ``rx_cb`` 回调。现有应用应结合默认值 ``false`` 评估是否需要启用该选项,以便在需要时进行广播节点发现。若动作帧的 Address3/BSSID 本身为广播地址,即便 ``allow_broadcast`` 保持 ``false``,回调仍会收到该帧。 + +- **Wi-Fi Initialization:** 如果 Wi-Fi 驱动已经初始化成功,再次调用函数 ``esp_wifi_init`` ,将不再返回 ``ESP_OK``,而是 ``ESP_ERR_INVALID_STATE``。 From cd2187e0267f5122cb114c286908705e40f81e87 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Mon, 3 Nov 2025 14:58:34 +0800 Subject: [PATCH 10/12] docs(wifi): update wifi fragment doc --- components/soc/esp32c2/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32c2/include/soc/soc_caps.h | 1 + components/soc/esp32c3/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32c3/include/soc/soc_caps.h | 1 + components/soc/esp32c5/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32c5/include/soc/soc_caps.h | 1 + components/soc/esp32c6/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32c6/include/soc/soc_caps.h | 1 + components/soc/esp32c61/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32c61/include/soc/soc_caps.h | 1 + components/soc/esp32s3/include/soc/Kconfig.soc_caps.in | 4 ++++ components/soc/esp32s3/include/soc/soc_caps.h | 1 + docs/en/api-guides/wifi.rst | 4 ++-- docs/zh_CN/api-guides/wifi.rst | 4 ++-- 14 files changed, 34 insertions(+), 4 deletions(-) diff --git a/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in index a79fd8fa48..33660f3000 100644 --- a/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c2/include/soc/Kconfig.soc_caps.in @@ -739,6 +739,10 @@ config SOC_WIFI_FTM_SUPPORT bool default y +config SOC_WIFI_TXOP_SUPPORT + bool + default y + config SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW bool default y diff --git a/components/soc/esp32c2/include/soc/soc_caps.h b/components/soc/esp32c2/include/soc/soc_caps.h index 701ee2c5ea..91b40d3a12 100644 --- a/components/soc/esp32c2/include/soc/soc_caps.h +++ b/components/soc/esp32c2/include/soc/soc_caps.h @@ -337,6 +337,7 @@ /*------------------------------------ WI-FI CAPS ------------------------------------*/ #define SOC_WIFI_HW_TSF (1) /*!< Support hardware TSF */ #define SOC_WIFI_FTM_SUPPORT (1) /*!< Support FTM */ +#define SOC_WIFI_TXOP_SUPPORT (1) /*!< Support TXOP */ #define SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW (1) /*!< Support delta early time for rf phy on/off */ #define SOC_WIFI_PHY_NEEDS_USB_WORKAROUND (1) /*!< SoC has WiFi and USB PHYs interference, needs a workaround */ diff --git a/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in index 4472fc985b..0e66894c4b 100644 --- a/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c3/include/soc/Kconfig.soc_caps.in @@ -1071,6 +1071,10 @@ config SOC_WIFI_WAPI_SUPPORT bool default y +config SOC_WIFI_TXOP_SUPPORT + bool + default y + config SOC_WIFI_CSI_SUPPORT bool default y diff --git a/components/soc/esp32c3/include/soc/soc_caps.h b/components/soc/esp32c3/include/soc/soc_caps.h index d25c7c661e..93c125addc 100644 --- a/components/soc/esp32c3/include/soc/soc_caps.h +++ b/components/soc/esp32c3/include/soc/soc_caps.h @@ -456,6 +456,7 @@ #define SOC_WIFI_FTM_SUPPORT (1) /*!< Support FTM */ #define SOC_WIFI_GCMP_SUPPORT (1) /*!< Support GCMP(GCMP128 and GCMP256) */ #define SOC_WIFI_WAPI_SUPPORT (1) /*!< Support WAPI */ +#define SOC_WIFI_TXOP_SUPPORT (1) /*!< Support TXOP */ #define SOC_WIFI_CSI_SUPPORT (1) /*!< Support CSI */ #define SOC_WIFI_MESH_SUPPORT (1) /*!< Support WIFI MESH */ #define SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW (1) /*!< Support delta early time for rf phy on/off */ diff --git a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in index 0e1520c13d..a68464341e 100644 --- a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in @@ -1667,6 +1667,10 @@ config SOC_WIFI_WAPI_SUPPORT bool default y +config SOC_WIFI_TXOP_SUPPORT + bool + default y + config SOC_WIFI_CSI_SUPPORT bool default y diff --git a/components/soc/esp32c5/include/soc/soc_caps.h b/components/soc/esp32c5/include/soc/soc_caps.h index 92c4c0b717..3c9a0a3737 100644 --- a/components/soc/esp32c5/include/soc/soc_caps.h +++ b/components/soc/esp32c5/include/soc/soc_caps.h @@ -666,6 +666,7 @@ #define SOC_WIFI_FTM_SUPPORT (1) /*!< Support FTM */ #define SOC_WIFI_GCMP_SUPPORT (1) /*!< Support GCMP(GCMP128 and GCMP256) */ #define SOC_WIFI_WAPI_SUPPORT (1) /*!< Support WAPI */ +#define SOC_WIFI_TXOP_SUPPORT (1) /*!< Support TXOP */ #define SOC_WIFI_CSI_SUPPORT (1) /*!< Support CSI */ #define SOC_WIFI_MESH_SUPPORT (1) /*!< Support WIFI MESH */ #define SOC_WIFI_HE_SUPPORT (1) /*!< Support Wi-Fi 6 */ diff --git a/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in index f393b198d6..0e203a75b7 100644 --- a/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c6/include/soc/Kconfig.soc_caps.in @@ -1443,6 +1443,10 @@ config SOC_WIFI_WAPI_SUPPORT bool default y +config SOC_WIFI_TXOP_SUPPORT + bool + default y + config SOC_WIFI_CSI_SUPPORT bool default y diff --git a/components/soc/esp32c6/include/soc/soc_caps.h b/components/soc/esp32c6/include/soc/soc_caps.h index a64d07dfdb..85879bfd7f 100644 --- a/components/soc/esp32c6/include/soc/soc_caps.h +++ b/components/soc/esp32c6/include/soc/soc_caps.h @@ -587,6 +587,7 @@ #define SOC_WIFI_FTM_SUPPORT (1) /*!< Support FTM */ #define SOC_WIFI_GCMP_SUPPORT (1) /*!< Support GCMP(GCMP128 and GCMP256) */ #define SOC_WIFI_WAPI_SUPPORT (1) /*!< Support WAPI */ +#define SOC_WIFI_TXOP_SUPPORT (1) /*!< Support TXOP */ #define SOC_WIFI_CSI_SUPPORT (1) /*!< Support CSI */ #define SOC_WIFI_MESH_SUPPORT (1) /*!< Support WIFI MESH */ #define SOC_WIFI_HE_SUPPORT (1) /*!< Support Wi-Fi 6 */ diff --git a/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in index c07f5dd57b..acbe0cbddb 100644 --- a/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in @@ -1215,6 +1215,10 @@ config SOC_WIFI_WAPI_SUPPORT bool default y +config SOC_WIFI_TXOP_SUPPORT + bool + default y + config SOC_WIFI_CSI_SUPPORT bool default y diff --git a/components/soc/esp32c61/include/soc/soc_caps.h b/components/soc/esp32c61/include/soc/soc_caps.h index aa80b52f2c..a6f8d56b1f 100644 --- a/components/soc/esp32c61/include/soc/soc_caps.h +++ b/components/soc/esp32c61/include/soc/soc_caps.h @@ -502,6 +502,7 @@ #define SOC_WIFI_FTM_SUPPORT (1) /*!< Support FTM */ #define SOC_WIFI_GCMP_SUPPORT (1) /*!< Support GCMP(GCMP128 and GCMP256) */ #define SOC_WIFI_WAPI_SUPPORT (1) /*!< Support WAPI */ +#define SOC_WIFI_TXOP_SUPPORT (1) /*!< Support TXOP */ #define SOC_WIFI_CSI_SUPPORT (1) /*!< Support CSI */ #define SOC_WIFI_MESH_SUPPORT (1) /*!< Support WIFI MESH */ #define SOC_WIFI_HE_SUPPORT (1) /*!< Support Wi-Fi 6 */ diff --git a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in index 1af3e5af9a..f1f101bf8f 100644 --- a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in @@ -1315,6 +1315,10 @@ config SOC_WIFI_WAPI_SUPPORT bool default y +config SOC_WIFI_TXOP_SUPPORT + bool + default y + config SOC_WIFI_CSI_SUPPORT bool default y diff --git a/components/soc/esp32s3/include/soc/soc_caps.h b/components/soc/esp32s3/include/soc/soc_caps.h index bb599f0381..f11ea6a931 100644 --- a/components/soc/esp32s3/include/soc/soc_caps.h +++ b/components/soc/esp32s3/include/soc/soc_caps.h @@ -536,6 +536,7 @@ #define SOC_WIFI_FTM_SUPPORT (1) /*!< Support FTM */ #define SOC_WIFI_GCMP_SUPPORT (1) /*!< Support GCMP(GCMP128 and GCMP256) */ #define SOC_WIFI_WAPI_SUPPORT (1) /*!< Support WAPI */ +#define SOC_WIFI_TXOP_SUPPORT (1) /*!< Support TXOP */ #define SOC_WIFI_CSI_SUPPORT (1) /*!< Support CSI */ #define SOC_WIFI_MESH_SUPPORT (1) /*!< Support WIFI MESH */ #define SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW (1) /*!< Support delta early time for rf phy on/off */ diff --git a/docs/en/api-guides/wifi.rst b/docs/en/api-guides/wifi.rst index cb9bae242e..b744fa74e2 100644 --- a/docs/en/api-guides/wifi.rst +++ b/docs/en/api-guides/wifi.rst @@ -2933,11 +2933,11 @@ Wi-Fi AMSDU Wi-Fi Fragment ------------------------- -.. only:: esp32 or esp32s2 +.. only:: not SOC_WIFI_TXOP_SUPPORT supports Wi-Fi receiving fragment, but does not support Wi-Fi transmitting fragment. -.. only:: esp32c3 or esp32s3 or esp32c5 or esp32c6 +.. only:: SOC_WIFI_TXOP_SUPPORT {IDF_TARGET_NAME} supports Wi-Fi receiving and transmitting fragment. diff --git a/docs/zh_CN/api-guides/wifi.rst b/docs/zh_CN/api-guides/wifi.rst index 4b82b1abcb..9cef99805b 100644 --- a/docs/zh_CN/api-guides/wifi.rst +++ b/docs/zh_CN/api-guides/wifi.rst @@ -2901,11 +2901,11 @@ Wi-Fi AMSDU Wi-Fi 分片 ------------------------- -.. only:: esp32 or esp32s2 +.. only:: not SOC_WIFI_TXOP_SUPPORT 支持 Wi-Fi 接收分片,但不支持 Wi-Fi 发送分片。 -.. only:: esp32c3 or esp32s3 or esp32c6 or esp32c5 +.. only:: SOC_WIFI_TXOP_SUPPORT {IDF_TARGET_NAME} 支持 Wi-Fi 接收和发送分片。 From ee234b6e1c285303c287cef2dbb34e509a6b81ff Mon Sep 17 00:00:00 2001 From: zhangyanjiao Date: Wed, 12 Nov 2025 19:23:34 +0800 Subject: [PATCH 11/12] fix(coex): fixed the espnow send fail when coex enable --- components/esp_rom/esp32c61/ld/esp32c61.rom.coexist.ld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_rom/esp32c61/ld/esp32c61.rom.coexist.ld b/components/esp_rom/esp32c61/ld/esp32c61.rom.coexist.ld index 2977468580..620cc3cece 100644 --- a/components/esp_rom/esp32c61/ld/esp32c61.rom.coexist.ld +++ b/components/esp_rom/esp32c61/ld/esp32c61.rom.coexist.ld @@ -31,7 +31,7 @@ coex_hw_timer_set = 0x40000a64; coex_schm_interval_set = 0x40000a68; coex_schm_lock = 0x40000a6c; coex_schm_unlock = 0x40000a70; -coex_status_get = 0x40000a74; +/* coex_status_get = 0x40000a74; */ coex_wifi_release = 0x40000a78; esp_coex_ble_conn_dynamic_prio_get = 0x40000a7c; /* Data (.data, .bss, .rodata) */ From 155d0927e165706f04939dc3cc1dde6646281fdb Mon Sep 17 00:00:00 2001 From: Li Shuai Date: Thu, 25 Sep 2025 20:43:13 +0800 Subject: [PATCH 12/12] docs(Power Management): support esp32c5 system and wifi low power programming guide docs --- docs/docs_not_updated/esp32c5.txt | 3 - .../low-power-mode/low-power-mode-soc.rst | 131 +++++++++++++++-- .../low-power-mode/low-power-mode-wifi.rst | 24 ++-- .../sleep-current/esp32c5_light_sleep.inc | 27 ++++ .../sleep-current/esp32c5_modem_sleep.inc | 107 ++++++++++++++ .../sleep-current/esp32c5_summary.inc | 87 ++++++++++++ .../low-power-mode/low-power-mode-soc.rst | 133 ++++++++++++++++-- .../low-power-mode/low-power-mode-wifi.rst | 24 ++-- .../sleep-current/esp32c5_light_sleep.inc | 27 ++++ .../sleep-current/esp32c5_modem_sleep.inc | 107 ++++++++++++++ .../sleep-current/esp32c5_summary.inc | 87 ++++++++++++ 11 files changed, 719 insertions(+), 38 deletions(-) create mode 100644 docs/en/api-guides/sleep-current/esp32c5_light_sleep.inc create mode 100644 docs/en/api-guides/sleep-current/esp32c5_modem_sleep.inc create mode 100644 docs/en/api-guides/sleep-current/esp32c5_summary.inc create mode 100644 docs/zh_CN/api-guides/sleep-current/esp32c5_light_sleep.inc create mode 100644 docs/zh_CN/api-guides/sleep-current/esp32c5_modem_sleep.inc create mode 100644 docs/zh_CN/api-guides/sleep-current/esp32c5_summary.inc diff --git a/docs/docs_not_updated/esp32c5.txt b/docs/docs_not_updated/esp32c5.txt index 9eeeccd3b6..0bbab90162 100644 --- a/docs/docs_not_updated/esp32c5.txt +++ b/docs/docs_not_updated/esp32c5.txt @@ -1,5 +1,3 @@ -api-guides/low-power-mode.rst -api-guides/deep-sleep-stub.rst api-guides/inc/external-ram-esp32-notes.rst api-reference/storage/vfs.rst api-reference/storage/spiffs.rst @@ -13,4 +11,3 @@ api-reference/storage/mass_mfg.rst api-reference/storage/fatfsgen.rst api-reference/storage/index.rst api-reference/storage/nvs_partition_parse.rst -api-reference/system/sleep_modes.rst diff --git a/docs/en/api-guides/low-power-mode/low-power-mode-soc.rst b/docs/en/api-guides/low-power-mode/low-power-mode-soc.rst index 028416d45f..1fe6927c3e 100644 --- a/docs/en/api-guides/low-power-mode/low-power-mode-soc.rst +++ b/docs/en/api-guides/low-power-mode/low-power-mode-soc.rst @@ -218,10 +218,10 @@ Recommended Configuration - 1000 * - ``max_freq_mhz`` - - 160 + - The maximum CPU frequency supported by {IDF_TARGET_NAME} * - ``min_freq_mhz`` - - 40 + - {CONFIG_XTAL_FREQ} * - ``light_sleep_enable`` - false @@ -288,6 +288,14 @@ This section introduces the recommended configuration and configuration steps fo Due to the shared power pins between flash and PSRAM, cutting power to PSRAM would result in data loss. Therefore, to ensure light sleep does not disrupt program execution, enabling this option requires that the system does not utilize PSRAM. +.. only:: SOC_PM_SUPPORT_TOP_PD + + - Power down Digital Peripheral modules and all child power domains under the TOP power domain in light sleep (:ref:`CONFIG_ESP_SLEEP_POWER_DOWN_FLASH`) + +.. only:: SOC_PM_SUPPORT_RTC_PERIPH_PD + + - Power down the RTC digital peripheral module. Automatically powered down the RTC digital peripherals during system sleep is the default system power management policy. Users can call `esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON)` to enable the RTC digital peripheral module while in sleep mode. + .. only:: esp32c2 - To reduce the on-chip RAM usage of the Power Management module (:ref:CONFIG_PM_SLEEP_FUNC_IN_IRAM), the options in the table below are used to control whether individual components of the Power Management module enable or disable on-chip RAM optimization when :ref:CONFIG_PM_SLEEP_FUNC_IN_IRAM is disabled. @@ -335,7 +343,7 @@ Configuration Steps: Recommended Configuration +++++++++++++++++++++++++++++ -.. only:: esp32c3 or esp32s3 +.. only:: esp32c6 or esp32c5 .. list-table:: :header-rows: 1 @@ -374,20 +382,125 @@ Recommended Configuration * - Power down CPU (:ref:`CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP`) - ON -.. only:: SOC_PM_SUPPORT_TAGMEM_PD + * - Power down flash in light sleep (:ref:`CONFIG_ESP_SLEEP_POWER_DOWN_FLASH`) + - OFF + + * - ``max_freq_mhz`` + - The maximum CPU frequency supported by {IDF_TARGET_NAME} + + * - ``min_freq_mhz`` + - {CONFIG_XTAL_FREQ} + + * - ``light_sleep_enable`` + - true + + .. note:: + Configurations not mentioned in the above table are set to default. + +.. only:: esp32s3 + + .. list-table:: + :header-rows: 1 + :widths: 30 15 + + * - Configuration Name + - Configuration Status + + * - Enable power management component (:ref:`CONFIG_PM_ENABLE`) + - ON + + * - Enable RTOS Tickless IDLE mode (:ref:`CONFIG_FREERTOS_USE_TICKLESS_IDLE`) + - ON + + * - RTOS Tick rate (Hz) (:ref:`CONFIG_FREERTOS_HZ`) + - 1000 + + * - Minimum IDLE Tick count before entering sleep mode (:ref:`CONFIG_FREERTOS_IDLE_TIME_BEFORE_SLEEP`) + - 3 + + * - Put light sleep related codes in IRAM (:ref:`CONFIG_PM_SLP_IRAM_OPT`) + - OFF + + * - Put RTOS IDLE related codes in IRAM (:ref:`CONFIG_PM_RTOS_IDLE_OPT`) + - OFF + + * - RTC slow clock source (:ref:`CONFIG_RTC_CLK_SRC`) + - Internal 150 kHz OSC + + * - Disable all GPIO when chip at sleep (:ref:`CONFIG_PM_SLP_DISABLE_GPIO`) + - ON + + * - Power down MAC and baseband (:ref:`CONFIG_ESP_PHY_MAC_BB_PD`) + - ON + + * - Power down CPU (:ref:`CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP`) + - ON * - Power down I/D-cache tag memory (:ref:`CONFIG_PM_RESTORE_CACHE_TAGMEM_AFTER_LIGHT_SLEEP`) - ON - * - Power down flash in light sleep (:ref:`CONFIG_ESP_SLEEP_POWER_DOWN_FLASH`) - OFF * - ``max_freq_mhz`` - - 160 + - The maximum CPU frequency supported by {IDF_TARGET_NAME} * - ``min_freq_mhz`` - - 40 + - {CONFIG_XTAL_FREQ} + + * - ``light_sleep_enable`` + - true + + .. note:: + Configurations not mentioned in the above table are set to default. + +.. only:: esp32c3 + + .. list-table:: + :header-rows: 1 + :widths: 30 15 + + * - Configuration Name + - Configuration Status + + * - Enable power management component (:ref:`CONFIG_PM_ENABLE`) + - ON + + * - Enable RTOS Tickless IDLE mode (:ref:`CONFIG_FREERTOS_USE_TICKLESS_IDLE`) + - ON + + * - RTOS Tick rate (Hz) (:ref:`CONFIG_FREERTOS_HZ`) + - 1000 + + * - Minimum IDLE Tick count before entering sleep mode (:ref:`CONFIG_FREERTOS_IDLE_TIME_BEFORE_SLEEP`) + - 3 + + * - Put light sleep related codes in IRAM (:ref:`CONFIG_PM_SLP_IRAM_OPT`) + - OFF + + * - Put RTOS IDLE related codes in IRAM (:ref:`CONFIG_PM_RTOS_IDLE_OPT`) + - OFF + + * - RTC slow clock source (:ref:`CONFIG_RTC_CLK_SRC`) + - Internal 150 kHz OSC + + * - Disable all GPIO when chip at sleep (:ref:`CONFIG_PM_SLP_DISABLE_GPIO`) + - ON + + * - Power down MAC and baseband (:ref:`CONFIG_ESP_PHY_MAC_BB_PD`) + - ON + + * - Power down CPU (:ref:`CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP`) + - ON + + * - Power down flash in light sleep (:ref:`CONFIG_ESP_SLEEP_POWER_DOWN_FLASH`) + - OFF + + * - ``max_freq_mhz`` + - The maximum CPU frequency supported by {IDF_TARGET_NAME} + + * - ``min_freq_mhz`` + - {CONFIG_XTAL_FREQ} * - ``light_sleep_enable`` - true @@ -432,7 +545,7 @@ Recommended Configuration - 160 * - ``min_freq_mhz`` - - 40 + - {CONFIG_XTAL_FREQ} * - ``light_sleep_enable`` - true @@ -480,7 +593,7 @@ Recommended Configuration - 120 * - ``min_freq_mhz`` - - 40 + - {CONFIG_XTAL_FREQ} * - ``light_sleep_enable`` - true diff --git a/docs/en/api-guides/low-power-mode/low-power-mode-wifi.rst b/docs/en/api-guides/low-power-mode/low-power-mode-wifi.rst index 57fed47709..b50509c5d1 100644 --- a/docs/en/api-guides/low-power-mode/low-power-mode-wifi.rst +++ b/docs/en/api-guides/low-power-mode/low-power-mode-wifi.rst @@ -5,9 +5,9 @@ Introduction to Low Power Mode in Wi-Fi Scenarios After the previous introduction to low power mode from a systemic perspective, this section delves into low power mode in Wi-Fi scenarios. Due to the complexity of Wi-Fi scenarios, basic principles of Wi-Fi power saving will be introduced before specific low power mode. This section is focused on station mode. -.. todo - add sleep-current/esp32c5_summary.inc and sleep-current/esp32c61_summary.inc +.. todo - add sleep-current/esp32c61_summary.inc -.. only:: not esp32c5 and not esp32c61 +.. only:: not esp32c61 Choosing Low Power Mode in Wi-Fi Scenarios --------------------------------------------- @@ -355,17 +355,17 @@ Modem-sleep Mode Configuration - 1000 * - ``max_freq_mhz`` - - 160 + - The maximum CPU frequency supported by {IDF_TARGET_NAME} * - ``min_freq_mhz`` - - 40 + - {CONFIG_XTAL_FREQ} * - ``light_sleep_enable`` - false - .. todo - add sleep-current/esp32c5_modem_sleep.inc sleep-current/esp32c61_modem_sleep.inc + .. todo - add sleep-current/esp32c61_modem_sleep.inc - .. only:: not esp32c5 and not esp32c61 + .. only:: not esp32c61 - Configuration Performance @@ -377,9 +377,9 @@ Auto Light-sleep Mode + Wi-Fi Scenario Configuration Auto Light-sleep mode in Wi-Fi scenarios does not require wake-up source configuration compared with a pure system. But the remaining part of configuration is basically the same in the two operation scenarios. Therefore, detailed introduction of configurable options, configuration steps, and recommended configurations can be found in the previous section :ref:`Deep-sleep Mode`, with the Wi-Fi-related configurations set to default. -.. todo - add sleep-current/esp32c5_light_sleep.inc and leep-current/esp32c61_light_sleep.inc +.. todo - add eep-current/esp32c61_light_sleep.inc -.. only:: not esp32c5 and not esp32c61 +.. only:: not esp32c61 - Configuration Performance @@ -415,3 +415,11 @@ Deep-sleep mode configuration in Wi-Fi scenarios is essentially the same as in a .. only:: esp32c2 Average current approximately 4.9 μA + + .. only:: esp32c6 + + Average current approximately 6.7 μA + + .. only:: esp32c5 + + Average current approximately 10.0 μA diff --git a/docs/en/api-guides/sleep-current/esp32c5_light_sleep.inc b/docs/en/api-guides/sleep-current/esp32c5_light_sleep.inc new file mode 100644 index 0000000000..5577f33535 --- /dev/null +++ b/docs/en/api-guides/sleep-current/esp32c5_light_sleep.inc @@ -0,0 +1,27 @@ +.. list-table:: + :header-rows: 1 + :widths: 20 10 20 20 20 + + * - CPU frequency + - DTIM + - Average current (mA) + - Max current (mA) + - Min current (mA) + + * - 240 MHz + - 1 + - 1.342 + - 80.375 + - 0.218 + + * - 240 MHz + - 3 + - 0.651 + - 81.179 + - 0.219 + + * - 240 MHz + - 10 + - 0.398 + - 80.518 + - 0.217 diff --git a/docs/en/api-guides/sleep-current/esp32c5_modem_sleep.inc b/docs/en/api-guides/sleep-current/esp32c5_modem_sleep.inc new file mode 100644 index 0000000000..b0e551ce6c --- /dev/null +++ b/docs/en/api-guides/sleep-current/esp32c5_modem_sleep.inc @@ -0,0 +1,107 @@ +.. list-table:: + :header-rows: 1 + :widths: 20 10 10 20 24 20 20 + + * - CPU frequency + - DFS + - DTIM + - Wi-Fi Band + - Average current (mA) + - Max current (mA) + - Min current (mA) + + * - 240 MHz + - ON + - 1 + - 2.4 GHz + - 24.766 + - 88.836 + - 23.139 + + * - 240 MHz + - OFF + - 1 + - 2.4 GHz + - 32.394 + - 97.378 + - 30.776 + + * - 240 MHz + - ON + - 3 + - 2.4 GHz + - 24.19 + - 89.176 + - 23.229 + + * - 240 MHz + - OFF + - 3 + - 2.4 GHz + - 31.618 + - 97.439 + - 30.778 + + * - 240 MHz + - ON + - 10 + - 2.4 GHz + - 23.998 + - 88.524 + - 23.252 + + * - 240 MHz + - OFF + - 10 + - 2.4 GHz + - 31.281 + - 98.254 + - 30.788 + + * - 240 MHz + - ON + - 1 + - 5 GHz + - 25.467 + - 114.746 + - 24.387 + + * - 240 MHz + - OFF + - 1 + - 5 GHz + - 32.329 + - 117.077 + - 31.948 + + * - 240 MHz + - ON + - 3 + - 5 GHz + - 25.208 + - 112.746 + - 24.421 + + * - 240 MHz + - OFF + - 3 + - 5 GHz + - 32.088 + - 117.227 + - 31.948 + + * - 240 MHz + - ON + - 10 + - 5 GHz + - 25.151 + - 114.438 + - 24.432 + + * - 160 MHz + - OFF + - 10 + - 5 GHz + - 32.011 + - 119.908 + - 31.955 diff --git a/docs/en/api-guides/sleep-current/esp32c5_summary.inc b/docs/en/api-guides/sleep-current/esp32c5_summary.inc new file mode 100644 index 0000000000..4df10c0851 --- /dev/null +++ b/docs/en/api-guides/sleep-current/esp32c5_summary.inc @@ -0,0 +1,87 @@ +.. list-table:: + :header-rows: 1 + :widths: 20 20 30 20 20 + + * - Item + - Modem-sleep + - Modem-sleep+DFS + - Auto Light-sleep + - Deep-sleep + + * - Sleep + - Automatic + - Automatic + - Automatic + - Manual + + * - Wake-up + - Automatic + - Automatic + - Automatic + - Configure Wake-up Source + + * - Wi-Fi Connection + - Maintain + - Maintain + - Maintain + - Disconnect + + * - CPU + - On + - On/Throttled + - Paused + - Off + + * - System Clock + - On + - On + - Off + - Off + + * - Peripherals + - On + - On + - On + - Off + + * - DTIM1 (2.4 GHz) + - 32.394 mA + - 24.766 mA + - 1.342 mA + - / + + * - DTIM1 (5 GHz) + - 32.329 mA + - 25.467 mA + - 1.514 mA + - / + + * - DTIM3 (2.4 GHz) + - 31.618 mA + - 24.19 mA + - 0.651 mA + - / + + * - DTIM3 (5 GHz) + - 32.088 mA + - 25.208 mA + - 0.764 mA + - / + + * - DTIM10 (2.4 GHz) + - 31.281 mA + - 23.998 mA + - 0.398 mA + - / + + * - DTIM10 (5 GHz) + - 32.011 mA + - 25.151 mA + - 0.451 mA + - / + + * - Average Current + - / + - / + - / + - 10.0 μA diff --git a/docs/zh_CN/api-guides/low-power-mode/low-power-mode-soc.rst b/docs/zh_CN/api-guides/low-power-mode/low-power-mode-soc.rst index d2ff809763..8a2950b190 100644 --- a/docs/zh_CN/api-guides/low-power-mode/low-power-mode-soc.rst +++ b/docs/zh_CN/api-guides/low-power-mode/low-power-mode-soc.rst @@ -218,10 +218,10 @@ DFS 有如下可配置选项: - 1000 * - ``max_freq_mhz`` - - 160 + - {IDF_TARGET_NAME} 支持的最大 CPU 频率 * - ``min_freq_mhz`` - - 40 + - {CONFIG_XTAL_FREQ} * - ``light_sleep_enable`` - false @@ -288,6 +288,14 @@ Light-sleep 模式配置 由于 flash 和 PSRAM 共用供电管脚,PSRAM 关闭供电将会导致数据丢失,因此,为保证 light sleep 不破坏程序运行状态,启用该选项的前提是系统没有使用 PSRAM。 +.. only:: SOC_PM_SUPPORT_TOP_PD + + - 关闭数字外设模块及 TOP 电源域下的所有子电源域 (:ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP`) + +.. only:: SOC_PM_SUPPORT_RTC_PERIPH_PD + + - 关闭 RTC 数字外设模块,系统睡眠时自动关闭 RTC 数字外设是系统电源管理默认策略,用户可以调用 `esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON)` 在睡眠状态下开启 RTC 数字外设模块 + .. only:: esp32c2 - 减少 Power Managemet 模块片内 RAM 内存资源使用量 (:ref:`CONFIG_PM_SLEEP_FUNC_IN_IRAM`),当 :ref:`CONFIG_PM_SLEEP_FUNC_IN_IRAM` 禁止时,下面表格中选项分别用于控制 Power Management 模块各部分组件启用或禁止片内 RAM 优化 @@ -335,7 +343,61 @@ Light-sleep 模式配置 推荐配置 +++++++++ -.. only:: esp32c3 or esp32s3 +.. only:: esp32c6 or esp32c5 + + .. list-table:: + :header-rows: 1 + :widths: 30 15 + + * - 配置名称 + - 设置情况 + + * - 启用电源管理组件 (:ref:`CONFIG_PM_ENABLE`) + - ON + + * - 启用 Tickless IDLE 模式 (:ref:`CONFIG_FREERTOS_USE_TICKLESS_IDLE`) + - ON + + * - RTOS Tick rate (Hz) (:ref:`CONFIG_FREERTOS_HZ`) + - 1000 + + * - 进入睡眠模式前最小 IDLE Tick 数 (:ref:`CONFIG_FREERTOS_IDLE_TIME_BEFORE_SLEEP`) + - 3 + + * - 将 light sleep 相关代码放置在片内 RAM 中 (:ref:`CONFIG_PM_SLP_IRAM_OPT`) + - ON + + * - 将 RTOS IDLE 相关代码放置在片内 RAM 中 (:ref:`CONFIG_PM_RTOS_IDLE_OPT`) + - ON + + * - RTC 慢速时钟源 (:ref:`CONFIG_RTC_CLK_SRC`) + - 内部 150 kHz 振荡器 + + * - 芯片休眠时禁用所有 GPIO (:ref:`CONFIG_PM_SLP_DISABLE_GPIO`) + - ON + + * - 关闭 MAC 和基带 (:ref:`CONFIG_ESP_PHY_MAC_BB_PD`) + - ON + + * - 关闭 CPU (:ref:`CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP`) + - ON + + * - 在 light sleep 状态关闭 flash 供电 (:ref:`CONFIG_ESP_SLEEP_POWER_DOWN_FLASH`) + - OFF + + * - ``max_freq_mhz`` + - {IDF_TARGET_NAME} 支持的最大 CPU 频率 + + * - ``min_freq_mhz`` + - {CONFIG_XTAL_FREQ} + + * - ``light_sleep_enable`` + - true + + .. note:: + 上表中不涉及的配置均是默认。 + +.. only:: esp32s3 .. list-table:: :header-rows: 1 @@ -374,20 +436,71 @@ Light-sleep 模式配置 * - 关闭 CPU (:ref:`CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP`) - ON -.. only:: SOC_PM_SUPPORT_TAGMEM_PD - * - 关闭指令和数据缓存中的标签存储器 (I/D-cache tag memory) (:ref:`CONFIG_PM_RESTORE_CACHE_TAGMEM_AFTER_LIGHT_SLEEP`) - ON - * - 在 light sleep 状态关闭 flash 供电 (:ref:`CONFIG_ESP_SLEEP_POWER_DOWN_FLASH`) - OFF * - ``max_freq_mhz`` - - 160 + - {IDF_TARGET_NAME} 支持的最大 CPU 频率 * - ``min_freq_mhz`` - - 40 + - {CONFIG_XTAL_FREQ} + + * - ``light_sleep_enable`` + - true + + .. note:: + 上表中不涉及的配置均是默认。 + +.. only:: esp32c3 + + .. list-table:: + :header-rows: 1 + :widths: 30 15 + + * - 配置名称 + - 设置情况 + + * - 启用电源管理组件 (:ref:`CONFIG_PM_ENABLE`) + - ON + + * - 启用 Tickless IDLE 模式 (:ref:`CONFIG_FREERTOS_USE_TICKLESS_IDLE`) + - ON + + * - RTOS Tick rate (Hz) (:ref:`CONFIG_FREERTOS_HZ`) + - 1000 + + * - 进入睡眠模式前最小 IDLE Tick 数 (:ref:`CONFIG_FREERTOS_IDLE_TIME_BEFORE_SLEEP`) + - 3 + + * - 将 light sleep 相关代码放置在片内 RAM 中 (:ref:`CONFIG_PM_SLP_IRAM_OPT`) + - OFF + + * - 将 RTOS IDLE 相关代码放置在片内 RAM 中 (:ref:`CONFIG_PM_RTOS_IDLE_OPT`) + - OFF + + * - RTC 慢速时钟源 (:ref:`CONFIG_RTC_CLK_SRC`) + - 内部 150 kHz 振荡器 + + * - 芯片休眠时禁用所有 GPIO (:ref:`CONFIG_PM_SLP_DISABLE_GPIO`) + - ON + + * - 关闭 MAC 和基带 (:ref:`CONFIG_ESP_PHY_MAC_BB_PD`) + - ON + + * - 关闭 CPU (:ref:`CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP`) + - ON + + * - 在 light sleep 状态关闭 flash 供电 (:ref:`CONFIG_ESP_SLEEP_POWER_DOWN_FLASH`) + - OFF + + * - ``max_freq_mhz`` + - {IDF_TARGET_NAME} 支持的最大 CPU 频率 + + * - ``min_freq_mhz`` + - {CONFIG_XTAL_FREQ} * - ``light_sleep_enable`` - true @@ -432,7 +545,7 @@ Light-sleep 模式配置 - 160 * - ``min_freq_mhz`` - - 40 + - {CONFIG_XTAL_FREQ} * - ``light_sleep_enable`` - true @@ -480,7 +593,7 @@ Light-sleep 模式配置 - 120 * - ``min_freq_mhz`` - - 40 + - {CONFIG_XTAL_FREQ} * - ``light_sleep_enable`` - true diff --git a/docs/zh_CN/api-guides/low-power-mode/low-power-mode-wifi.rst b/docs/zh_CN/api-guides/low-power-mode/low-power-mode-wifi.rst index 532cf46196..5c063df5fa 100644 --- a/docs/zh_CN/api-guides/low-power-mode/low-power-mode-wifi.rst +++ b/docs/zh_CN/api-guides/low-power-mode/low-power-mode-wifi.rst @@ -5,9 +5,9 @@ Wi-Fi 场景下低功耗模式介绍 本节将结合纯系统下的功耗模式来介绍 Wi-Fi 场景下的低功耗模式。因为 Wi-Fi 场景的复杂性,本节会首先介绍 Wi-Fi 省电的基本原理,然后再介绍具体的低功耗模式。本节主要针对 station 模式。 -.. todo - add sleep-current/esp32c5_summary.inc and sleep-current/esp32c61_summary.inc +.. todo - add sleep-current/esp32c61_summary.inc -.. only:: not esp32c5 and not esp32c61 +.. only:: not esp32c61 Wi-Fi 场景如何选择低功耗模式 -------------------------------------- @@ -355,17 +355,17 @@ Modem-sleep 模式配置 - 1000 * - ``max_freq_mhz`` - - 160 + - {IDF_TARGET_NAME} 支持的最大 CPU 频率 * - ``min_freq_mhz`` - - 40 + - {CONFIG_XTAL_FREQ} * - ``light_sleep_enable`` - false - .. todo - add sleep-current/esp32c5_modem_sleep.inc sleep-current/esp32c61_modem_sleep.inc + .. todo - add sleep-current/esp32c61_modem_sleep.inc - .. only:: not esp32c5 and not esp32c61 + .. only:: not esp32c61 - 配置表现 @@ -377,9 +377,9 @@ Auto Light-sleep 模式 + Wi-Fi 场景配置 Auto Light-sleep 在 Wi-Fi 场景下的配置比纯系统下少了唤醒源的配置要求,其余几乎与纯系统下配置一致,因此可配置选项、配置步骤、推荐配置的详细介绍可以参考上文 :ref:`Deep-sleep 模式`。同时 Wi-Fi 相关配置保持默认。 -.. todo - add sleep-current/esp32c5_light_sleep.inc and leep-current/esp32c61_light_sleep.inc +.. todo - add sleep-current/esp32c61_light_sleep.inc -.. only:: not esp32c5 and not esp32c61 +.. only:: not esp32c61 - 配置表现 @@ -415,3 +415,11 @@ Deep-sleep 模式在 Wi-Fi 场景下的配置与纯系统下配置基本一致 .. only:: esp32c2 平均电流约 4.9 μA + + .. only:: esp32c6 + + 平均电流约 6.7 μA + + .. only:: esp32c5 + + 平均电流约 10.0 μA diff --git a/docs/zh_CN/api-guides/sleep-current/esp32c5_light_sleep.inc b/docs/zh_CN/api-guides/sleep-current/esp32c5_light_sleep.inc new file mode 100644 index 0000000000..6673f03295 --- /dev/null +++ b/docs/zh_CN/api-guides/sleep-current/esp32c5_light_sleep.inc @@ -0,0 +1,27 @@ +.. list-table:: + :header-rows: 1 + :widths: 20 10 20 20 20 + + * - CPU 频率 + - DTIM + - 平均电流 (mA) + - 最大电流 (mA) + - 最小电流 (mA) + + * - 240 MHz + - 1 + - 1.342 + - 80.375 + - 0.218 + + * - 240 MHz + - 3 + - 0.651 + - 81.179 + - 0.219 + + * - 240 MHz + - 10 + - 0.398 + - 80.518 + - 0.217 diff --git a/docs/zh_CN/api-guides/sleep-current/esp32c5_modem_sleep.inc b/docs/zh_CN/api-guides/sleep-current/esp32c5_modem_sleep.inc new file mode 100644 index 0000000000..55623d7ec8 --- /dev/null +++ b/docs/zh_CN/api-guides/sleep-current/esp32c5_modem_sleep.inc @@ -0,0 +1,107 @@ +.. list-table:: + :header-rows: 1 + :widths: 20 10 10 20 24 20 20 + + * - CPU 频率 + - DFS + - DTIM + - Wi-Fi Band + - 平均电流 (mA) + - 最大电流 (mA) + - 最小电流 (mA) + + * - 240 MHz + - ON + - 1 + - 2.4 GHz + - 24.766 + - 88.836 + - 23.139 + + * - 240 MHz + - OFF + - 1 + - 2.4 GHz + - 32.394 + - 97.378 + - 30.776 + + * - 240 MHz + - ON + - 3 + - 2.4 GHz + - 24.19 + - 89.176 + - 23.229 + + * - 240 MHz + - OFF + - 3 + - 2.4 GHz + - 31.618 + - 97.439 + - 30.778 + + * - 240 MHz + - ON + - 10 + - 2.4 GHz + - 23.998 + - 88.524 + - 23.252 + + * - 240 MHz + - OFF + - 10 + - 2.4 GHz + - 31.281 + - 98.254 + - 30.788 + + * - 240 MHz + - ON + - 1 + - 5 GHz + - 25.467 + - 114.746 + - 24.387 + + * - 240 MHz + - OFF + - 1 + - 5 GHz + - 32.329 + - 117.077 + - 31.948 + + * - 240 MHz + - ON + - 3 + - 5 GHz + - 25.208 + - 112.746 + - 24.421 + + * - 240 MHz + - OFF + - 3 + - 5 GHz + - 32.088 + - 117.227 + - 31.948 + + * - 240 MHz + - ON + - 10 + - 5 GHz + - 25.151 + - 114.438 + - 24.432 + + * - 160 MHz + - OFF + - 10 + - 5 GHz + - 32.011 + - 119.908 + - 31.955 diff --git a/docs/zh_CN/api-guides/sleep-current/esp32c5_summary.inc b/docs/zh_CN/api-guides/sleep-current/esp32c5_summary.inc new file mode 100644 index 0000000000..ca51abd706 --- /dev/null +++ b/docs/zh_CN/api-guides/sleep-current/esp32c5_summary.inc @@ -0,0 +1,87 @@ +.. list-table:: + :header-rows: 1 + :widths: 20 20 30 20 20 + + * - 项目 + - Modem-sleep + - Modem-sleep+DFS + - Auto Light-sleep + - Deep-sleep + + * - 休眠 + - 自动 + - 自动 + - 自动 + - 手动 + + * - 唤醒 + - 自动 + - 自动 + - 自动 + - 配置唤醒源 + + * - Wi-Fi连接 + - 保持 + - 保持 + - 保持 + - 断开 + + * - CPU + - 开 + - 开/降频 + - 暂停或关 + - 关 + + * - 系统时钟 + - 开 + - 开 + - 关 + - 关 + + * - 外设 + - 开 + - 开 + - 暂停或关 + - 关 + + * - DTIM1 (2.4 GHz) + - 32.394 mA + - 24.766 mA + - 1.342 mA + - / + + * - DTIM1 (5 GHz) + - 32.329 mA + - 25.467 mA + - 1.514 mA + - / + + * - DTIM3 (2.4 GHz) + - 31.618 mA + - 24.19 mA + - 0.651 mA + - / + + * - DTIM3 (5 GHz) + - 32.088 mA + - 25.208 mA + - 0.764 mA + - / + + * - DTIM10 (2.4 GHz) + - 31.281 mA + - 23.998 mA + - 0.398 mA + - / + + * - DTIM10 (5 GHz) + - 32.011 mA + - 25.151 mA + - 0.451 mA + - / + + * - 平均电流 + - / + - / + - / + - 10.0 μA