Code: Select all
uint64_t toSleep = 43200000000;
esp_sleep_enable_timer_wakeup(toSleep);
esp_deep_sleep_start();
Code: Select all
uint64_t toSleep = 43200000000;
esp_sleep_enable_timer_wakeup(toSleep);
esp_deep_sleep_start();
This workaround takes too much power consumption.You may also be able to work around it in software: for instance, set your wake time 40 minutes earlier than when you want to wake up, then during that 'early wakeup' get the current time (e.g. from ntp) and set deep sleep for the small period to the actual wake-up. That trick should get you an accuracy of +/- 4 minutes.
Setting CONFIG_RTC_CLK_SRC_INT_8MD256=y can improve this.A. I find it hard to believe it drifts over 20 minutes in 12 hours.
B. How do I make it work to be at least within a few minutes max?
Users browsing this forum: Baidu [Spider], Qwantbot and 2 guests