Community,
A few Electrons deployed remotely are waking prematurely during sleep. For example, in one unit with a ~60min sleep cycle, the unit wakes ~45times. On wake, I publish the sleep result as one of the following strings:
String wakeupStrings[5] = {“UNKNOWN”, “BY_GPIO”, “BY_ADC”, “BY_DAC”, “BY_RTC”};
The unit wakes from BY_GPIO, not RTC. It appears to return to sleep normally.
I am using the following sleep configuration with SYSTEM_THREAD(ENABLED) and SYSTEM_MODE(AUTOMATIC) thanks to a recommendation by rickkas7 in a previous thread.
SystemSleepConfiguration config;
config.mode(SystemSleepMode::STOP)
.network(NETWORK_INTERFACE_CELLULAR)
.flag(SystemSleepFlag::WAIT_CLOUD)
.gpio(RI_UC, RISING)
.duration(sleepTime);
delay(10000);
SystemSleepResult result = System.sleep(config);
Serial.printlnf("%d:%d:%d Sleep end. Reason = %d.",Time.hour(), Time.minute(), Time.second(), result.wakeupReason());
The issue does not arise on all Electrons running the same code. Any ideas as to why this is occurring?
-Kara