Disabling BT controller does not lower consumption

keramazigh
Posts: 4
Joined: Fri May 18, 2018 11:14 am

Disabling BT controller does not lower consumption

Postby keramazigh » Fri May 18, 2018 12:19 pm

I'm trying to develop a Bluetooth beacon, that broadcasts for a few seconds (less than 10) and then goes into deep sleep until it is awaken by an external event. Unfortunately, consumption remains very high even in deep sleep mode. I developed the smallest possible code to try to show the problem (see below). I'm using ESP-IDF v3.0 and I tested with two ESP-WROOM32 (ESP32D0WDQ6 rev 0 & 1) and one ESP32-PICO-D4 and I get the same results.
- 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
}

keramazigh
Posts: 4
Joined: Fri May 18, 2018 11:14 am

Re: Disabling BT controller does not lower consumption

Postby keramazigh » Tue May 22, 2018 10:49 am

I solved my problem. In fact the problem did not really exist. The power source, I was using when measuring consumption was not the same as the one I'm using for developing and debugging and It was not able to deliver enough power when BT controller starts (peaks seem as high as 280 mA), causing a brownout, followed by a software reset.

Who is online

Users browsing this forum: Google [Bot] and 63 guests