ESP32-S3-WROOM Module High Deep Sleep Current
Posted: Thu Sep 07, 2023 9:13 am
I'm debugging an ESP32-S3 module at the moment with a very high deep sleep current. That device is not running much more than a Bluedroid BLE GATT server and is built onto a custom PCB. I've isolated all other power consumers on the board, so the ESP is the only thing running.
I've attempted to isolate GPIOs and have tried manually disabling the bt controller before entering deep sleep. Interestingly, when I run `esp_bt_controller_disable()` it increases the deep sleep current to 1.8ma. If that command isn't run, the chip consumes 500µA when in deep sleep which is a far cry from the <10µA I'm expecting.
The chip is not running the ESP ADC and just has SPI peripherals and some GPIOs. Here's an abbreviated version of the sleep function:
Any ideas?
I've attempted to isolate GPIOs and have tried manually disabling the bt controller before entering deep sleep. Interestingly, when I run `esp_bt_controller_disable()` it increases the deep sleep current to 1.8ma. If that command isn't run, the chip consumes 500µA when in deep sleep which is a far cry from the <10µA I'm expecting.
The chip is not running the ESP ADC and just has SPI peripherals and some GPIOs. Here's an abbreviated version of the sleep function:
Code: Select all
void power_modes_sleep(void) {
/* Initialize selected GPIOs as RTC IO, enable input, disable pullup and pulldown */
/* Load ULP program and start the ULP. */
esp_err_t err = ulp_riscv_load_binary(ulp_main_bin_start, (ulp_main_bin_end - ulp_main_bin_start));
ESP_ERROR_CHECK(err);
/* Start the ULP program. */
err = ulp_riscv_run();
ESP_ERROR_CHECK(err);
rtc_gpio_isolate(GPIO_NUM_1);
...
rtc_gpio_isolate(GPIO_NUM_20);
ESP_ERROR_CHECK(esp_bt_controller_disable());
ESP_ERROR_CHECK(esp_sleep_enable_ulp_wakeup());
/* Go back to sleep, only the ULP Risc-V will run. */
printf("Entering to deep sleep in 0..\n\n");
/* Small delay to ensure the messages are printed. */
vTaskDelay(100);
/* Turn off main processor. */
esp_deep_sleep_start();
}