- Before enabling BT controller, consumption is around 30 mA
- After enabling BT controller, consumption is above 60 mA
- After disabling BT controller, consumption is still above 60 mA
- After entering deep sleep, consumption is still above 60 mA (although not completely stable)
Code: Select all
void app_main()
{
ESP_ERROR_CHECK(nvs_flash_init());
ESP_ERROR_CHECK(esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT));
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
vTaskDelay(5000 / portTICK_PERIOD_MS); // Before enabling BT controller, current around 30 mA
esp_bt_controller_init(&bt_cfg);
esp_bt_controller_enable(ESP_BT_MODE_BLE);
vTaskDelay(5000 / portTICK_PERIOD_MS); // After enabling BT controller, current is above 60 mA
esp_bt_controller_disable();
esp_bt_controller_deinit();
vTaskDelay(5000 / portTICK_PERIOD_MS); // After disabling BT controller, current is still abover 60 mA
esp_deep_sleep_start(); // When in deep sleep, current remains above 60 mA
}