ESP32-C3 PinAlarm not firing in light_sleep on level high
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- embedded-iot
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- C
- Estrellas
- 4.6k
- Forks
- 1.4k
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 161
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de adafruit/circuitpython
-
documentation enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
adafruit/circuitpython#11689 ·
Los mantenedores suelen responder en 1 día
-
analogio bug esp32-p4
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
adafruit/circuitpython#11685 ·
Los mantenedores suelen responder en 1 día
-
Feather RP2350: MAX3421E instead of PIO USB host, or a second build?Posiblemente ocupada @mikeysklar la tomó hace 1 día. Abierto
adafruit/circuitpython#11697 · 1 comentario · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
rp2040 zephyr
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
adafruit/circuitpython#11690 ·
Los mantenedores suelen responder en 1 día
-
bug esp32-p4 network
Dificultad 4/5 1-2 días Aptitud para principiantes 45/100
adafruit/circuitpython#11682 ·
Los mantenedores suelen responder en 1 día
Todos los issues de adafruit/circuitpython
Issues similares
-
documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
-
BUG: `tandg` and `cotdg` lose precision near their poles, `fresnel` is NaN for `|x| >= 2^512`Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
0.kind: build failure
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 2 días