From 7580de6be151e5f6329574ffe6a256d07063e0f4 Mon Sep 17 00:00:00 2001 From: baohongde Date: Tue, 9 Nov 2021 12:01:03 +0800 Subject: [PATCH] components/bt: Fix the issue caused by the power off the bt power domain --- components/bt/controller/esp32c3/bt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/bt/controller/esp32c3/bt.c b/components/bt/controller/esp32c3/bt.c index 9eef33a1c3..f8ec29ee21 100644 --- a/components/bt/controller/esp32c3/bt.c +++ b/components/bt/controller/esp32c3/bt.c @@ -37,6 +37,7 @@ #include "esp32c3/rom/rom_layout.h" #include "esp_timer.h" #include "esp_sleep.h" +#include "phy.h" #if CONFIG_BT_ENABLED @@ -1245,6 +1246,11 @@ esp_err_t esp_bt_controller_deinit(void) esp_unregister_mac_bb_pu_callback(btdm_mac_bb_power_up_cb); #endif + /* Fix the issue caused by the power off the bt power domain. + * This issue is only on ESP32C3. + */ + phy_init_flag(); + esp_bt_power_domain_off(); free(osi_funcs_p);