ESP32 deep sleep for 6+ hours
Posted: Thu Aug 22, 2024 7:40 am
Im having trouble with my putting my esp32 to sleep for over 1 hour.
For 1 hour it works but when I try for 6 hours it wakes up every 3-4 minutes or so.
Any suggestion would be greatly appriciated.
For 1 hour it works but when I try for 6 hours it wakes up every 3-4 minutes or so.
Code: Select all
//ABOVE SETUP
#define uS_TO_S_FACTOR 1000000UL /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 21600 /* Time ESP32 will go to sleep (in seconds) */
uint64_t u64SleepLength = TIME_TO_SLEEP * uS_TO_S_FACTOR;/* Time ESP32 will go to sleeps */
//SETUP FUNCTION
esp_sleep_enable_timer_wakeup(u64SleepLength);
//LOOP FUNCTION
esp_deep_sleep_start();