Open microbit-carlos opened 4 months ago
Okay, if in the infinite loop the programme yields for a second we see a lower time to go to sleep:
while (true) {
uBit.power.deepSleep(1000);
uBit.sleep(1000);
}
So top level view:
If we zoom in, we can see the first half (one second) with uBit.sleep()
and the half (one second) with uBit.power.deepSleep()
:
And if we zoom into at the 2nd half, when it is going into uBit.power.deepSleep()
, we can see that it takes about 95 ms to go to sleep:
So it must be the combination of going to sleep and waking up in short succession that causes the 600 ms delay.
We can also see that the first 100ms of being awake are spending more power, so that's likely how long it takes for CODAL to try to wake and restore everything.
With a bare minimum programme like this one:
It takes about 600 msec to fully go to deep sleep: