← index #14079Issue #15751
Related · medium · value 1.069
QUERY · ISSUE

Rp2: Incorrect CPU freq after lightsleep()

openby mungewellopened 2024-03-13updated 2025-03-03
bugport-rp2

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 a short script to enter/exit lightsleep(), checking CPU freq afterwards show that it has changed.

MPY: soft reboot
CPU Freq 100000000
entering lightsleep
wake from sleep
CPU Freq 125000000

blink.py.txt

Expected behaviour

Expect it not to change...

Observed behaviour

CPU freq reports differently to that previously set.

Additional Information

No, I've provided everything above.

CANDIDATE · ISSUE

machine.lightsleep makes time.sleep_ms takes more time on every call

openby staltuxopened 2024-08-30updated 2024-09-01
bug

Port, board and/or hardware

rp2040

MicroPython version

MicroPython v1.23.0 on 2024-06-02; Raspberry Pi Pico with RP2040

Reproduction

while True:
# omitted code to turn led on and off
time.sleep_ms(500)
machine.lightsleep(4000)

Expected behaviour

every call to time.sleep_ms(500) should take the same time

Observed behaviour

the led take more and more time to turn on and off after the same sleep_ms()

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied