earlephilhower / arduino-pico

Raspberry Pi Pico Arduino core, for all RP2040 and RP2350 boards
GNU Lesser General Public License v2.1
2.03k stars 421 forks source link

Feature Request: Add 402MHz mode (tested) #2273

Closed DatanoiseTV closed 4 weeks ago

DatanoiseTV commented 3 months ago

In the PicoADK Firmware (PicoSDK based) we are overclocking the RP2040 to 402MHz successfully. It would be great to see this in the Arduino-Pico package. So far only 1-2 chips out of >100 did not work properly.

https://github.com/DatanoiseTV/PicoADK-Firmware-Template/blob/main/src/picoadk_hw.cpp#L7

vreg_set_voltage(VREG_VOLTAGE_1_30);
sleep_ms(1);
set_sys_clock_khz(402000, true);

The overvoltage should be adjusted according to this chart: image

Also see: https://forums.raspberrypi.com/viewtopic.php?t=301902&start=50

This might require to set flash clock divider to 4. Not sure how this can be achieved with the Arduino-Pico core. This is the way I am doing it using the PicoSDK.

pico_define_boot_stage2(slower_boot2 ${PICO_DEFAULT_BOOT_STAGE2_FILE})
target_compile_definitions(slower_boot2 PRIVATE PICO_FLASH_SPI_CLKDIV=4)

pico_set_boot_stage2(TARGET slower_boot2)
DatanoiseTV commented 3 months ago

2274