Inconsistent sleeping with SDK 2.1.0 uint64_t sleep times
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying the extended deepSleep times available with the latest SDK 2.1.0 from https://github.com/esp8266/Arduino/pull/3278
Some sleep time values work fine but some don't seem to work and the ESP wakes up almost immediately. Bit strange. Here's a sketch that shows the problem:
```
extern "C" {
#include "user_interface.h"
}
void setup() {
Serial.begin(115200); Serial.println();
Serial.print("rtc proc: "); Serial.println(system_rtc_clock_cali_proc());
// uint64_t sleepTime = 60000000; // WORKS: 60 seconds
// uint64_t sleepTime = 7200000000; // WORKS: 2 hours
// uint64_t sleepTime = 9000000000; // WORKS: 2.5 hours
uint64_t sleepTime = 21600000000; // FAILS: 6 hours
// uint64_t sleepTime = 74049000000; // FAILS: bit over 20 hours
// uint64_t sleepTime = 86400000000; // WORKS: 24 hours
Serial.println("deepSleeping ...");
system_deep_sleep(sleepTime);
delay(100);
}
void loop() {
// shouldn't get here
Serial.println("loop");
delay(1000);
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.