diff --git a/components/bt/controller/esp32c2/bt.c b/components/bt/controller/esp32c2/bt.c index d27f645e1c..ab22329294 100644 --- a/components/bt/controller/esp32c2/bt.c +++ b/components/bt/controller/esp32c2/bt.c @@ -630,6 +630,7 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg) #endif esp_phy_modem_init(); periph_module_enable(PERIPH_BT_MODULE); + periph_module_reset(PERIPH_BT_MODULE); if (ble_osi_coex_funcs_register((struct osi_coex_funcs_t *)&s_osi_coex_funcs_ro) != 0) { ESP_LOGW(NIMBLE_PORT_LOG_TAG, "osi coex funcs reg failed"); @@ -687,6 +688,7 @@ controller_init_err: ble_controller_deinit(); modem_deint: esp_phy_modem_deinit(); + periph_module_disable(PERIPH_BT_MODULE); #if CONFIG_BT_NIMBLE_ENABLED ble_npl_eventq_deinit(nimble_port_get_dflt_eventq()); #endif // CONFIG_BT_NIMBLE_ENABLED @@ -713,6 +715,8 @@ esp_err_t esp_bt_controller_deinit(void) #endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED ble_controller_deinit(); + periph_module_disable(PERIPH_BT_MODULE); + #if CONFIG_BT_NIMBLE_ENABLED /* De-initialize default event queue */ ble_npl_eventq_deinit(nimble_port_get_dflt_eventq());