I tried power down some domains manually but this doesn't change consumption.
C
Code: Select all
extern const uint8_t ulp_main_bin_start[] asm("_binary_ulp_main_bin_start");
extern const uint8_t ulp_main_bin_end[] asm("_binary_ulp_main_bin_end");
void initULP()
{
ulp_load_binary(0, ulp_main_bin_start, (ulp_main_bin_end - ulp_main_bin_start) / sizeof(uint32_t));
ulp_run((&ulp_main - RTC_SLOW_MEM) / sizeof(uint32_t));
}
extern "C" void app_main()
{
if (esp_sleep_get_wakeup_cause() == ESP_SLEEP_WAKEUP_ULP)
{
ESP_LOGI("ESP32", "ULP Wakeup");
}
else
{
ESP_LOGI("ESP32", "!= Wakeup");
initULP();
}
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_AUTO);
esp_deep_sleep(1800000000);
}
Code: Select all
.bss
.text
.global main
main:
loop:
jump loop