Automatic Light Sleep

tlechman
Posts: 2
Joined: Tue Sep 15, 2020 8:42 pm

Automatic Light Sleep

Postby tlechman » Wed Sep 16, 2020 2:49 pm

Hi!

There seems to be very limited information about attaining automatic light sleep even though it looks like that was part of the IDF v3.3 release. I'd like to achieve the typical RTOS scenario of disabling the clock and leaving memory in retention while in the FreeRTOS idle task. From the datasheet, it seems like espressif refers to this state as light sleep.

So far, I've enabled tickless idle and enabled power management and dynamic frequency scaling via menuconfig and have seen the current drop to ~15mA @ 3.3V while idling in the idle task. This seems to be in line with modem sleep but very high for light sleep.

My program is the system/console example running inside its own task. Entering light sleep with the console command drops consumption down to 4mA.

I'm running ESP IDF v4.1 via platformio on the ESP32 DevKitC and debugging with the ESP-Prog. All current measurements were taken between the esp-prog supply and the 3.3v pin on the dev kit.

boarchuz
Posts: 280
Joined: Tue Aug 21, 2018 5:28 am

Re: Automatic Light Sleep

Postby boarchuz » Wed Sep 16, 2020 11:31 pm

Setting those options via menuconfig ensures the functionality is included in the build, but you then need to enable it at runtime via esp_pm_configure() with esp_pm_config_esp32_t::light_sleep_enable = true.

https://docs.espressif.com/projects/esp ... ement.html

tlechman
Posts: 2
Joined: Tue Sep 15, 2020 8:42 pm

Re: Automatic Light Sleep

Postby tlechman » Thu Sep 17, 2020 1:49 pm

Is there a way to prevent light sleep from disconnecting the debugger?

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 28 guests