You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ESP32-C3 PinAlarm not firing in light_sleep on level high #11680
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.
Activity