Page 1 of 1

ESP32-C3 deep sleep and gettimeofday

Posted: Thu Jun 29, 2023 3:41 pm
by HelgardM
Hello all,

I'm trying to maintain a valid time stamp during deep sleep with the ESP32-C3. With settime of day I set the unix time stamp and a subsequent gettimeofday returns correctly.

After a deep_sleep, the gettimeofday function returns a value of 0. Why is this happening?

I understood that the gettimeofday function call will always return the set time, regardless of deep sleep.

Re: ESP32-C3 deep sleep and gettimeofday

Posted: Fri Jun 30, 2023 1:07 am
by ESP_Sprite
It shouldn't do that, indeed. What ESP-IDF version do you use and can you share your project?