You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RP2350: lowering cpu.frequency can crash or hang the board #11882
Lowering microcontroller.cpu.frequency on RP2350 sometimes crashes or hangs the board. Raising it has not failed in testing. Seen on CircuitPython main (bede374):
Board
Sequence
Result
Adafruit Fruit Jam
300 MHz, then 48 MHz
Crashed and restarted in 1 of 8 tries (reset reason SOFTWARE, no safe mode)
Raspberry Pi Pico 2 W, Wi-Fi connected
250 MHz, write microcontroller.nvm[0], 100 MHz, then wifi.radio.ping(gateway)
Hung, and USB stopped enumerating, in 3 of 9 tries
On the Pico 2 W without the nvm write, pings at 100 MHz return None and recover at 150 MHz, with no hang.
Possible cause
common_hal_mcu_processor_set_frequency() in ports/raspberrypi/common-hal/microcontroller/Processor.c sets the core voltage for the new frequency before changing the clock, then waits 10 ms. When lowering the frequency, that runs the old, faster clock at the lower voltage (1.10 V) for those 10 ms. The pico-sdk only shows the other half: runtime_init_clocks() raises the voltage before raising the clock.
Changing the order (raise the voltage before raising the clock, lower it after lowering the clock) did not fix the Pico 2 W hang, which still happened in 3 of 5 tries. So the voltage order is not the only cause, or not the cause. Other candidates are the CYW43 PIO SPI link, whose clock comes from the system clock, and interactions with the flash write.
The last time I checked the SPI PIO link was a compile time setting. @eightycc had a detailed discussion on this in one of the issues related to RM2 support: #9777 (comment)
I encountered the problem also with a RP2040, so I don't think it is a RP2350 problem.
Pico 2 W: the Wi-Fi chip's SPI clock is the CPU clock divided by 3, so slowing the CPU slows the link. Below 150 MHz Wi-Fi stops working, and at 100 MHz the board freezes waiting on the chip. Voltage isn't involved: 150 → 135 keeps 1.20 V and still kills Wi-Fi.
Fruit Jam: when lowering, the voltage drops 10 ms before the clock does, so 300 MHz briefly runs at 1.10 V.
Activity
bablokb commentedon Nov 16, 2026
The last time I checked the SPI PIO link was a compile time setting. @eightycc had a detailed discussion on this in one of the issues related to RM2 support: #9777 (comment)
I encountered the problem also with a RP2040, so I don't think it is a RP2350 problem.
mikeysklar commentedon Nov 16, 2026
Two separate bugs.
Pico 2 W: the Wi-Fi chip's SPI clock is the CPU clock divided by 3, so slowing the CPU slows the link. Below 150 MHz Wi-Fi stops working, and at 100 MHz the board freezes waiting on the chip. Voltage isn't involved: 150 → 135 keeps 1.20 V and still kills Wi-Fi.
Fruit Jam: when lowering, the voltage drops 10 ms before the clock does, so 300 MHz briefly runs at 1.10 V.
mikeysklar commentedon Nov 17, 2026
The Pico 2 W hang is a Wi-Fi clock problem.
The Wi-Fi chip's clock divider is fixed when Wi-Fi starts, so a slower CPU makes that link too slow.
I opened raspberrypi/pico-sdk#3303 so the divider can be changed while Wi-Fi is running.
Once that merges, CircuitPython can set it after each speed change.
The Fruit Jam crash is a separate cause, fixed in #11885.