What's the proper way to enable FreeRTOS automatic light sleep?
Posted: Wed Sep 25, 2019 5:36 pm
I'm trying to enable automatic light sleep when all the tasks in my application are sleeping (vTaskDelay). I have placed the following code in main() and enabled power management and Tickless_idle in MENUCONFIG:
Even though I did see a small power reduction, it's still consuming about 50mA which tells me the cores are still running.
one of the tasks waits on xQueueReceive for GPIO input, and the other sleeps most of the time.
What am I doing wrong?
Thanks,
-a
Code: Select all
esp_pm_config_esp32_t pm_config = {
.max_freq_mhz = 240,
.min_freq_mhz = 10,
.light_sleep_enable = true
};
ESP_ERROR_CHECK(esp_pm_configure(&pm_config));
one of the tasks waits on xQueueReceive for GPIO input, and the other sleeps most of the time.
What am I doing wrong?
Thanks,
-a