← index #12102PR #15498
Off-topic · high · value 1.919
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 · PULL REQUEST

py/port/esp32 support on esp32c3 for deepsleep wakeup with gpio pins

closedby m-casopened 2024-07-19updated 2025-11-20
port-esp32

Adding support on esp32c3 port for deepsleep wakeup with gpio pins and retriving the pin(s) that triggered the wakeup

<!-- Thanks for submitting a Pull Request! We appreciate you spending the
time to improve MicroPython. Please provide enough information so that
others can review your Pull Request.

 Before submitting, please read:
 https://github.com/micropython/micropython/blob/master/CODEOFCONDUCT.md
 https://github.com/micropython/micropython/wiki/ContributorGuidelines

 Please check any CI failures that appear after your Pull Request is opened.

-->

Summary

<!-- Explain the reason for making this change. What problem does the pull request
solve, or what improvement does it add? Add links if relevant. -->
The current support for the ESP32C3 platform contains errors preventing the usage of deep sleep wakeup with pins. Two older PRs (#13333 and #7990) were created to fix this using gpio pins and to add the necessary calls to retrieve the pin(s) that triggered the wake. I have refactored the code, updated to the latest master (e.g. STATIC -> static) and tested.

Testing

<!-- Explain what testing you did, and on which boards/ports. If there are
boards or ports that you couldn't test, please mention this here as well.

 If you leave this empty then your Pull Request may be closed. -->

I created a new version of the firmware for a project of mine and it has been working since months.

Trade-offs and Alternatives

<!-- If the Pull Request has some negative impact (i.e. increased code size)
then please explain why you think the trade-off improvement is worth it.
If you can think of alternative ways to do this, please explain that here too.

 Delete this heading if not relevant (i.e. small fixes) -->

No tradeoffs that I am aware of.

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