-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
espressif: Pins preserved during deep-sleep cannot be toggled after wakeup #9622
Comments
After some tinkering I found a workaround: Calling led = DigitalInOut(board.IO1)
led.deinit()
led = DigitalInOut(board.IO1) #led works again The reason for this issue seems to be that The workaround works because Not sure what the best strategy would be to fix this. Reset every pin after wake from deepsleep? Or call |
I think the DigitalInOut constructor should call this. It is taking control back over from the hold. Want to make a PR for this? Thanks for testing! |
I thought about this too but wasn't sure: Would it be only |
I think DigitalInOut would be enough because that is what |
But |
Ya, that's true. I wonder if we should detect that a pin is held and then make a DigitalInOut available for it. Then you would need to deinit it to use it for something else. Otherwise we have to decide when to un-hold the pin. |
CircuitPython version
Code/REPL
Behavior
The led blinks once and then remains dark until the chip is reset.
Excpected behaviour: Led blinks once every 10 seconds.
Description
This happens in both fake deep sleep as well as in real deep sleep.
If
preserve_dios=[led]
is omitted, the led blinks brightly and glows dimly during deep sleep and becomes bright again after deep sleep (which is correct behaviour as far as I know).Additional information
No response
The text was updated successfully, but these errors were encountered: