Skip to content

Feather RP2040 alarm.wake_alarm not set upon wake from deep sleep #5794

Open
@dlizotte-uwo

Description

@dlizotte-uwo

CircuitPython version

Adafruit CircuitPython 7.1.0 on 2021-12-28; Adafruit Feather RP2040 with rp2040

Code/REPL

import alarm
import board
import digitalio
import neopixel
import time

np = neopixel.NeoPixel(board.NEOPIXEL, 1)

# Off for 1 second
np[0] = (0,0,0)
time.sleep(1)

if alarm.wake_alarm is not None:
    # red if woke from sleep
    np[0] = (50,0,0)
else:
    # blue if not woke from sleep
    np[0] = (0,0,50)

# Create a an alarm that will trigger 5 seconds from now.
time_alarm = alarm.time.TimeAlarm(monotonic_time=time.monotonic() + 5)
# Exit the program, and then deep sleep until the alarm wakes us.
alarm.exit_and_deep_sleep_until_alarms(time_alarm)

Behavior

alarm.wake_alarm is None upon wake from deep sleep on the Feather RP2040 when not connected over USB. (Using battery.)

It is set in "fake" deep sleep when connected over USB.

This example uses TimeAlarm; I saw it happen with PinAlarm also.

Description

Seems to be same issue as #5343 but only in real deep sleep

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions