Since my experiences in an earlier esp32 project i was sure that the millis() value isn't maintained over light-sleep. And i had to use the RTC myself to determine the sleep time.
Now more or less by accident i recognized that the millis() value is indeed corrected after wakeup from light-sleep.
Does this behaviour changed over idf or arduino Versions?
Are there any requirements to make this work which are now met by accident?
millis() and light-sleep
Re: millis() and light-sleep
It is possible that this hasn't worked in the first arduino-esp32 release, v1.0.0, which came out in July 2018.
arduino-esp32 uses esp_timer_get_time IDF function to implement millis, and esp_timer_get_time has maintained time in light sleep since IDF v3.1, released in September 2018.
If you have observed this behavior in later releases of arduino-esp32, then I don't have an explanation for this. But maintaining the 'millis' value in light sleep is now the expected behavior!
arduino-esp32 uses esp_timer_get_time IDF function to implement millis, and esp_timer_get_time has maintained time in light sleep since IDF v3.1, released in September 2018.
If you have observed this behavior in later releases of arduino-esp32, then I don't have an explanation for this. But maintaining the 'millis' value in light sleep is now the expected behavior!
Re: millis() and light-sleep
Thank you for this information.
Maybe i can figure out which versions were in use. Just for curiosity.
Maybe i can figure out which versions were in use. Just for curiosity.
Who is online
Users browsing this forum: Google [Bot] and 127 guests