ESP32-C3 PinAlarm not firing in light_sleep on level high
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- embedded-iot
Direzione di ricerca
Start by tracing ESP32-C3 light-sleep PinAlarm handling and how it configures the pin for a high-level wake condition; the issue does not name source files or tests. Compare the low-level alarm behavior with the reported high-level case and the three short-sleep workaround. Done when releasing the button wakes light sleep promptly without requiring the workaround.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
CircuitPython version and board name
Adafruit CircuitPython 10.3.1 on 2026-09-14; Maker Go ESP32C3 Supermini with ESP32-C3
Board ID:makergo_esp32c3_supermini
Code/REPL
...
wake = alarm.light_sleep_until_alarms(
alarm.time.TimeAlarm(monotonic_time=deadline),
alarm.pin.PinAlarm(
pin=board.IO21,
value=True,
pull=False,
)
)
Behavior
When the (active-low) button is not pressed, I add the alarm:
alarm.pin.PinAlarm(
pin=board.IO21,
value=False,
pull=True,
)
Then the light_sleep returns immediately with the PinAlarm as soon as the button is pressed.
But after that, I call the light sleep again, this time adding:
alarm.pin.PinAlarm(
pin=board.IO21,
value=True,
pull=False,
)
But this time, releasing the button has no effect, and the sleep returns later with a TimerAlarm once the time_monotonic deadline is reached.
I have a workaround: call the light_sleep 3 times with very short deadlines (time_monotonic 10ms in future). After this, I call light_sleep with a much longer timer expiry, and releasing the button has immediate effect.
The electrical wiring has the button pulling the pin to earth, with no other components such as pull-ups.
This issue is asymmetrical, because a PinAlarm waiting for a logic low (button pressed) always returns instantly from the sleep. It's just waiting for logic high that's giving me problems.
Fortunately the workaround has proven effective. But I'd like to find a cleaner solution.
For context, I'm executing the light_sleep in a scheduler run loop, where the scheduler is feeding off a jobs queue, executing jobs that are due to run, and otherwise light_sleeping until the next job is due.
Description
No response
Additional information
No response
- Lingua principale
- C
- Stelle
- 4.6k
- Fork
- 1.4k
- Merge medio
- 1g 13h
- PR unite (30g)
- 171
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di adafruit/circuitpython
-
documentation enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
adafruit/circuitpython#11689 ·
I maintainer di solito rispondono entro 1 giorno
-
analogio bug esp32-p4
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
adafruit/circuitpython#11685 ·
I maintainer di solito rispondono entro 1 giorno
-
bug sdcardio storage usb
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
adafruit/circuitpython#11715 ·
I maintainer di solito rispondono entro 1 giorno
-
Hard faults and watchdog timeouts with combination of ESP32SPI or SPI WIZnet, and wifi monitorForse già presa @dhalbert l’ha presa oggi. Apertabug network
adafruit/circuitpython#11710 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Feather RP2350: MAX3421E instead of PIO USB host, or a second build?Forse già presa @mikeysklar l’ha presa 3 giorni fa. Apertarp2 usb
adafruit/circuitpython#11697 · 4 commenti · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di adafruit/circuitpython
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
FujiNetWIFI/fujinet-firmware#2261 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
kivy/python-for-android#3405 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Nmap
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
area/infrared type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
DarkFlippers/unleashed-firmware#1201 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
pocoproject/poco#5626 ·
I maintainer di solito rispondono entro 2 giorni