I have a battery powered application I run on my Arduino Nano ESP32, I measured teh deep sleep power consumption to be ~14mA. This gives me a bit too little standby time, is there a way to use the ESP32 hibernation mode?
I'd like to use this code to switch of power domains before going into sleep:
esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF);
esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_OFF);
esp_deep_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_OFF);
esp_deep_sleep_pd_config(ESP_PD_DOMAIN_XTAL, ESP_PD_OPTION_OFF);
esp_deep_sleep_pd_config(ESP_PD_DOMAIN_ULP, ESP_PD_OPTION_OFF);
esp_deep_sleep_start();
The error it gives is:
Compilation error: 'esp_deep_sleep_pd_config' was not declared in this scope
I have found this Github issue that may be related to your question, where someone suggested to use esp_sleep_pd_config (without deep_!) instead. Hope this is helpful!
This worked! I figured out the power consumption is from a perifirial appliance (VL53L0X Time-of_Flight sensor) running in the background. The problem is that I cannot "cut" the 3V3 power out from the board during deep sleep.
Both libraries I can use (Adafruit and Pololu) for this sensor do not have the option to shut down the VL53L0X on board microcontroller. Is there a way to "de-initialize" such a sensor, so that it does not consume powers?