ESP32-C3 PinAlarm not firing in light_sleep on level high
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 52/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Domínio
- embedded-iot
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- C
- Estrelas
- 4.6k
- Forks
- 1.4k
- Merge médio
- 1d 18h
- PRs com merge (30d)
- 161
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de adafruit/circuitpython
-
documentation enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
adafruit/circuitpython#11689 ·
Mantenedores costumam responder em até 1 dia
-
analogio bug esp32-p4
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
adafruit/circuitpython#11685 ·
Mantenedores costumam responder em até 1 dia
-
Feather RP2350: MAX3421E instead of PIO USB host, or a second build?Talvez já em andamento @mikeysklar assumiu há 1 dia. Aberta
adafruit/circuitpython#11697 · 1 comentário · 2 responsáveis ·
Mantenedores costumam responder em até 1 dia
-
rp2040 zephyr
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
adafruit/circuitpython#11690 ·
Mantenedores costumam responder em até 1 dia
-
bug esp32-p4 network
Dificuldade 4/5 1-2 dias Facilidade para iniciantes 45/100
adafruit/circuitpython#11682 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de adafruit/circuitpython
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
epics-base/epics-base#1034 ·
Mantenedores costumam responder em até 2 dias
-
documentation
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 72/100
-
kind: bug preview-effort: small priority: medium
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
Mantenedores costumam responder em até 1 dia
-
BUG: `tandg` and `cotdg` lose precision near their poles, `fresnel` is NaN for `|x| >= 2^512`Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia