8000 alarm.exit_and_deep_sleep_until_alarms() not exiting sleep when interrupted · Issue #7081 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

alarm.exit_and_deep_sleep_until_alarms() not exiting sleep when interrupted #7081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
billedluh opened this issue Oct 18, 2022 · 1 comment · Fixed by #7196
Closed

alarm.exit_and_deep_sleep_until_alarms() not exiting sleep when interrupted #7081

billedluh opened this issue Oct 18, 2022 · 1 comment · Fixed by #7196
Assignees
Labels
alarms and sleep rp2040 Raspberry Pi RP2040
Milestone

Comments

@billedluh
Copy link

I have a simple setup with an RP2040 feather controlling some neopixels and am trying to get it to reliably deep sleep when not in use. I have a vibration switch between GND and A2, and am sleeping until the vibration switch gets triggered using

pin_alarm = alarm.pin.PinAlarm(pin=board.A2, value=False, pull=True)
alarm.exit_and_deep_sleep_until_alarms(pin_alarm)

This works great and my current consumption goes from ~28mA to ~2mA once it gets to sleep. But if I happen to trigger the vibration switch while it's in the process of going to sleep it seems to go unresponsive. Current consumption still goes down to ~2 but it no longer wakes until I toggle reset. Ive confirmed that the pull-up resistor is getting configured correctly (I see 3.3v on pin A2).

This problem is extremely reproducible on this setup, if I give it an extra second after the current has dropped down it seems to wake every time, but if I spam the vibe switch while it's getting ready to sleep it pretty consistently gets locked up.

Everything works as expected when connected to serial and using simulated deep sleep.

@billedluh
Copy link
Author

Oh and I've reproduced the problem in both 7.3.3 and 8.0.0. What other bits have I forgotten to mention?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alarms and sleep rp2040 Raspberry Pi RP2040
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0