badger2040
badger2040 copied to clipboard
badger2040.system_speed regression
Since badger2040.system_speed
was migrated into Python to use machine.freq
it's lost a lot of edge cases that handle lower clock frequencies, and additionally lacks the slight overvoltage that may make higher frequencies stable on some systems.
We need a custom module giving an implementation of machine.freq that looks more like the old Badger 2040 system_speed
function.
Old function: https://github.com/pimoroni/pimoroni-pico/blob/c8d3b6b7d1875b35147867e31b102ffcad128788/micropython/modules/badger2040/badger2040.cpp#L535-L591
New function: https://discord.com/channels/801944326401556512/801944538981466183/1110852447242567690
MicroPython's machine.freq()
: https://github.com/micropython/micropython/blob/ed7a3b11d9a6c21a964d55ebfcdefeb392389d10/ports/rp2/modmachine.c#L102-L116