micropython / micropython/micropython
esp32.wake_on_ext0 not workingon esp32s2
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 22.1k
- Forks
- 9k
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 16
Description
Port, board and/or hardware
esp32 port, waveshare ESP32-S2-Pico
MicroPython version
MicroPython v1.23.0 on 2024-06-02; Generic ESP32S2 module with ESP32S2
Reproduction
import os,time,esp32
from machine import Pin,deepsleep
time.sleep(5)
pb=Pin(0, Pin.IN); esp32.wake_on_ext0(pb,0)
deepsleep(10*1000)
Expected behaviour
Loaded the file as main.py then reset the board. Expected s2 to either deepsleep for 10s or exit deepsleep when I press the button connected to gpio0.
Observed behaviour
The s2 exits deepsleep immediately after entering it. This can be verified with a usb ammeter in series with the usb powering the board. I did not include print commands because having a usb repl active often plays badly with deepsleep.
Additional Information
esp32.wake_on_ext0 works OK with deepsleep on an esp32 v1.23.0 so I figure the instant wakeup on the s2 is down to it being an s2.
Code of Conduct
Yes, I agree
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the esp32.wake_on_ext0 and machine.deepsleep entry points in the provided reproduction, using the Waveshare ESP32-S2-Pico and GPIO0 setup. Compare the ESP32-S2 behavior with the reported working ESP32 case. Done means deepsleep lasts 10 seconds or exits when GPIO0 is pressed, without an immediate wake.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100