Rp2: Incorrect CPU freq after lightsleep()
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
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.
if uart receives 0xf0 byte then mcu after entering lightsleep never wakes up
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, STM32L4, STM32H7
MicroPython version
MicroPython v1.22.2 on 2024-02-22; Raspberry Pi Pico with RP2040
Reproduction
Example for Rpi Pico:
from machine import Pin, UART, lightsleep
from time import sleep
uart = UART(0, baudrate=115200, bits=8, tx=Pin(0), rx=Pin(1), parity=None, stop = 1, timeout=2000)
## Main Loop ##
uart.write("Start \n")
while True:
sleep(1)
buff=bytearray()
while uart.any():
buff.extend(bytearray(uart.read(uart.any())))
# to exit program send '9'
if buff.find(b"9")>=0:
break
if len(buff)>0:
buff.append(10)
uart.write(buff)
uart.write("before lightsleep \n")
lightsleep(100)
sleep(0.05)
uart.write("after lightsleep\n")
Expected behaviour
No response
Observed behaviour
If uart receives 0xf0 byte then mcu after entering lightsleep never wakes up.
If message doesn't have 0xf0 byte then it continues working ok.
I tried it on RPi Pico, and STM32 boards they have same behavior.
Additional Information
No, I've provided everything above.