← index #12102Issue #3834
Related · high · value 2.095
QUERY · ISSUE

Deep sleep support for RP2 port

openby aallanopened 2023-07-27updated 2025-09-22
enhancementport-rp2

This entry in the documentation suggests that there is support for deep sleep in the current MicroPython release. However, as far as I can see there isn't? At least, there doesn't seem to be a machine.DEEPSLEEP_RESET present in the current build.

Looking at https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/ it looks like adding this capability to the rp2 port is fairly easy, and there is an out of date — and looks to be unmaintained — fork at https://github.com/ghubcoder/micropython-pico-deepsleep.

Any plans to add support for DEEP SLEEP to the RP2 machine class?

CANDIDATE · ISSUE

pyboard - deepsleep wake pins

openby diginfoopened 2018-06-02updated 2019-04-18
port-stm32

I have just switched to pyboard for a project which has been on the esp32 and I need to be able to wake from deep sleep by either time or a pin edge.

https://github.com/micropython/micropython/blob/master/docs/library/machine.Pin.rst
https://docs.micropython.org/en/latest/pyboard/library/machine.Pin.html

These pages indicate that the syntax for enabling a wake-up pin is:

import machine as mc
door = mc.Pin('X1',mc.Pin.IN)
door.irq(handler=None, trigger=(mc.Pin.IRQ_FALLING | mc.Pin.IRQ_RISING),wake=mc.DEEPSLEEP)

However this results in an error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'DEEPSLEEP'

What's the solution ?

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied