-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
RP2 - lightsleep() fails/does not exit when started from inside a thread - solution #14092
Comments
I commented out various bits of the
So does this mean that the (previously set) timer interrupt does not occur, if running from within a thread? And if so, why? |
Seems that IRQs are NOT enabled, on the core that the code is running.... if we enable them, then the Patch (mixed in with my other stuff) is something like
|
BTW I have PR with the Pico SDK for keeping some of the clocks running: |
As per Bug micropython#14092 when called from within a thread the interrupts may not be enabled on current core, and thus the call to `lightsleep()` never completes. Signed-off-by: Simon Wood <[email protected]>
As per Bug micropython#14092 when called from within a thread the interrupts may not be enabled on current core, and thus the call to `lightsleep()` never completes. Signed-off-by: Simon Wood <[email protected]>
When `lightsleep()` is called from within a thread the interrupts may not be enabled on current core, and thus the call to `lightsleep()` never completes. Fixes issue micropython#14092. Signed-off-by: Simon Wood <[email protected]>
Fixed in 19844b4 |
When `lightsleep()` is called from within a thread the interrupts may not be enabled on current core, and thus the call to `lightsleep()` never completes. Fixes issue micropython#14092. Signed-off-by: Simon Wood <[email protected]>
Checks
I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.
I've searched for existing issues matching this bug, and didn't find any.
Port, board and/or hardware
rp2 - official Pico (non-wifi)
MicroPython version
MicroPython v1.22.2 on 2024-02-22; Raspberry Pi Pico with RP2040
Reproduction
Run the attached script...
blink_thread.py.txt
Expected behaviour
When called within (only) a function,
lightsleep()
correct exits and the rest of the function are run.Observed behaviour
The
lightsleep()
call does not exit....Additional Information
No, I've provided everything above.
The text was updated successfully, but these errors were encountered: