Skip to content

PinAlarm not working properly with value=True #6994

@kattni

Description

@kattni

CircuitPython version

Adafruit CircuitPython 8.0.0-beta.1-6-gb62f8b35e on 2022-10-04; Adafruit Feather ESP32S2 with ESP32S2

Code/REPL

import board
import alarm

print("Alarm:", alarm.wake_alarm)

pin_alarm = alarm.pin.PinAlarm(pin=board.D12, value=True, pull=True)
print("Entering deep sleep.")
alarm.exit_and_deep_sleep_until_alarms(pin_alarm)

Behavior

While connected to the serial console, it prints Entering deep sleep. and then nothing. The Pretending to deep sleep.... message never shows up, and you can no longer interact with the serial console with CTRL+D/C. If you want to save and reload your code, you must press the reset button to do so.

Description

If you connect the trigger pin to GND before reloading the board, and then connect it to 3V, it at least wakes up the board when connected to 3V, but it still seems to be a bit wonky.

If you update value to False, the issue is resolved, and everything responds appropriately.

Additional information

Narrowed the issue down to this after testing #6676 (the TimeAlarm+PinAlarm issue was a red herring, they work fine together.)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions