Skip to content

RP2 - lightsleep() fails/does not exit when started from inside a thread - solution #14092

@mungewell

Description

@mungewell

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.

MPY: soft reboot
Blink in thread test
CPU Freq 100000000
entering lightsleep
wake from sleep
CPU Freq 125000000

Observed behaviour

The lightsleep() call does not exit....

MPY: soft reboot
Blink in thread test
CPU Freq 100000000
entering lightsleep

...

Additional Information

No, I've provided everything above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions