Content-Length: 232728 | pFad | http://github.com/micropython/micropython/issues/17334

E7 ESP32-C6: WAKEUP_ALL_LOW causes GPIO pin to be stuck upon waking from deeepsleep · Issue #17334 · micropython/micropython · GitHub
Skip to content

ESP32-C6: WAKEUP_ALL_LOW causes GPIO pin to be stuck upon waking from deeepsleep #17334

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

Open
ned-pcs opened this issue May 21, 2025 · 1 comment
Labels

Comments

@ned-pcs
Copy link
Contributor

ned-pcs commented May 21, 2025

Port, board and/or hardware

ESP32_C6_GENERIC, Seeed Studio XIAO ESP32-C6

MicroPython version

MicroPython v1.25.0 on 2025-04-15; ESP32C6 module with ESP32C6

Reproduction

  1. Copy the code below into main.py on an ESP32-C6 board.
  2. Reset the board.
from machine import Pin, deepsleep
from esp32 import wake_on_ext1, WAKEUP_ALL_LOW 
from time import sleep_ms

BUTTON_PIN = 0  # must be RTC-capable pin.
LED_PIN = 15 # XIAO ESP32-C6 User LED pin, active LOW

sleep_ms(1000) # wait for button to be released

button = Pin(BUTTON_PIN, Pin.IN, Pin.PULL_UP)
led = Pin(LED_PIN, Pin.OUT, value=1)  # active low

def blink_led(period_ms):
    led.value(0)  # turn on LED
    sleep_ms(period_ms)
    led.value(1)  # turn off LED

blink_led(500)

if button.value() == 1:
    wake_on_ext1([button], WAKEUP_ALL_LOW)
    deepsleep()
else:
    print("Button is pressed. Not going to sleep.")
    while True:
        sleep_ms(100)
        blink_led(100)

Expected behaviour

Expected to long-blink the LED once after reset.
If pin GPIO 0 is briefly connected to GND you should get another single blink.

Observed behaviour

The LED long-blinks once, then again after 1 second, then flashes rapidly, indicating that pin 0 is stuck LOW.

Interrupting with mpremote repl you can examine the state of button:

>>> button.value()
0
>>>

Additional Information

If you use esp32.WAKEUP_ANY_HIGH (and Pin.PULL_DOWN) it works correctly.

Also, wake_on_ext0(button, WAKEUP_ALL_LOW) doesn't wake up on the GPIO going LOW.

Code of Conduct

Yes, I agree

@ned-pcs ned-pcs added the bug label May 21, 2025
@ned-pcs
Copy link
Contributor Author

ned-pcs commented May 21, 2025

On 1.24.1 neither wake_on_ext0 nor wake_on_ext1 will allow wakeup with WAKEUP_ALL_LOW on this board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/micropython/micropython/issues/17334

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy