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
rp2/rp2_flash: Add MICROPY_HW_FLASH_MAX_FREQ to replace fixed max freq.
Assuming a 133MHz capable flash in 91cff8e
caused `rp2_flash_set_timing_internal` to set out of range dividers for
some boards (anything with value of 4 and flash that doesn't tolerate
higher speeds).
This affected (at least) the XIAO RP2350 board, making it non-bootable.
Since Pico SDK's `PICO_FLASH_SPI_CLKDIV` is entirely unreliable on a system
with a variable system clock (users can change it at runtime) then use it
only to work out a default `MICROPY_HW_FLASH_MAX_FREQ`.
This value can be overridden in board config.
Note that RP2350's default clock is 150MHz, RP2040's is 125MHz and it has
been certified at 200MHz so it's quite possible that
`PICO_FLASH_SPI_CLKDIV` is unreliable even at standard RP2 clocks.
(If flash timings are marginal then this can manifest as instability rather
than outright failure.)
Fixes issue micropython#17375.
Signed-off-by: Phil Howard <github@gadgetoid.com>
0 commit comments