You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defwork():
led.value=1time.sleep(LED_TIME)
led.value=0whileTrue:
# do some workwork()
# sleepifMODE==SPIN:
next=time.monotonic() +INT_TIMEwhiletime.monotonic() <next:
continueelifMODE==SLEEP:
print(f"(normal) sleep for {INT_TIME}s")
time.sleep(INT_TIME)
elifMODE==LIGHT_SLEEP:
print(f"(light) sleep for {INT_TIME}s")
time_alarm=alarm.time.TimeAlarm(monotonic_time=time.monotonic()+INT_TIME)
alarm.light_sleep_until_alarms(time_alarm)
elifMODE==DEEP_SLEEP:
print(f"(deep) sleep for {INT_TIME}s")
time_alarm=alarm.time.TimeAlarm(monotonic_time=time.monotonic()+INT_TIME)
alarm.exit_and_deep_sleep_until_alarms(time_alarm)
Behavior
With light-sleep, I can see the following current (at 3.6V):
So in light-sleep mode, the SWAN needs about 30mA. When the LED is on and the device sleeps normally (during work()), current is only about 16mA.
Deep-sleep is even more broken:
You can see that the device tries to switch to deep-sleep, but it wakes up again without actually sleeping (note that this is not fake deep-sleep, there was no USB connection). After wake up, you can see the 16mA during work() again, then the try-to-go-to-deep-sleep-and-fail cycle starts over.
Description
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
CircuitPython version
Code/REPL
Behavior
With light-sleep, I can see the following current (at 3.6V):
So in light-sleep mode, the SWAN needs about 30mA. When the LED is on and the device sleeps normally (during
work()
), current is only about 16mA.Deep-sleep is even more broken:
You can see that the device tries to switch to deep-sleep, but it wakes up again without actually sleeping (note that this is not fake deep-sleep, there was no USB connection). After wake up, you can see the 16mA during
work()
again, then the try-to-go-to-deep-sleep-and-fail cycle starts over.Description
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: