#real/simulated light sleep does not add up
1 messages · Page 1 of 1 (latest)
To start getting complicated. One measurement was made with the USB connected when powered on. The other measurement was USB unconnected, then powered on.
what were the two measurements
18.5mA with USB cable, 17.8mA without.
I haven't tested an RP2040 feather, but on a Pico, when it goes to Deep Sleep, current drops down to 1-2 milliamps.
(The RP2040 isn't great in low power modes)
What's the CP code you're using?
import alarm
import board
import time
import microcontroller
import digitalio
pin_led = digitalio.DigitalInOut(board.LED)
pin_led.switch_to_output()
pin_alarm_button = alarm.pin.PinAlarm(pin = board.BUTTON, value = False, pull = True)
time.sleep(1)
for p in range(10):
pin_led.value = 1
time.sleep(0.2)
pin_led.value = 0
time.sleep(0.1)
alarm.light_sleep_until_alarms(pin_alarm_button)
# Avoid resetting into bootloader
time.sleep(3)
microcontroller.reset()
oh. I've never used one of the light sleep modes. I'm not surprised the current saving is modest, especially on the RP2040
I would not be surprised if the entire IO system had to stay active to detect a pin change.
I did just test deep sleep with the same code, for which CPy helpfully writes 'Pretending to deep sleep until alarm, CTRL-C or file write.' with USB connected. And does drop down to practically 0mA. I can try to fix that another time.