ULP check if esp32 is currently sleeping

Larsogames
Posts: 4
Joined: Mon Jun 08, 2020 9:07 pm

ULP check if esp32 is currently sleeping

Postby Larsogames » Fri Oct 30, 2020 9:08 pm

Hello Forum,

Is it possible to let the ULP-Coprocessor determine current sleep state (i.e. let the ULP check if system is in light_sleep or deep_sleep)?

Thank you,
Lars

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

Re: ULP check if esp32 is currently sleeping

Postby boarchuz » Sat Oct 31, 2020 8:12 am

It's common to check RTC_CNTL_RDY_FOR_WAKEUP for wakeup readiness: https://docs.espressif.com/projects/esp ... p-the-chip
This should be effectively the same, for deep sleep at least.

Larsogames
Posts: 4
Joined: Mon Jun 08, 2020 9:07 pm

Re: ULP check if esp32 is currently sleeping

Postby Larsogames » Sat Nov 14, 2020 6:21 pm

boarchuz wrote:
Sat Oct 31, 2020 8:12 am
It's common to check RTC_CNTL_RDY_FOR_WAKEUP for wakeup readiness: https://docs.espressif.com/projects/esp ... p-the-chip
This should be effectively the same, for deep sleep at least.
Thanks!

Works like a charm!

RTC_CNTL_RDY_FOR_WAKEUP is always 0 when esp is active and seems always 1 of esp is sleeping

Who is online

Users browsing this forum: Google [Bot] and 276 guests