Pico Micropython overclocked twice (250MHz) works fine

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Tatito
Posts: 5
Joined: Tue Apr 27, 2021 3:58 pm

Re: Pico Micropython overclocked twice (250MHz) works fine

Post by Tatito » Thu Apr 29, 2021 10:43 pm

Programs are indeed running x2 faster with firmware.250MHZ.uf2. Thanks for providing this!

One observation: this is true if the program is launched from Thonny (Thonny can then be closed and the program keeps running fast). However, the same program saved as main.py and launched by just powering the Pico anew runs at the standard (twice lower) speed. With the conventional firmware installed, both modes of launching lead to the same (twice lower) speed.

I am new to micropython. Is there an obvious reason for the above? Looks counterintuitive to me, but I ran several tests. Is there something that can be added to main.py to have it run x2 faster in standalone mode? (e.g., with the Pico powered by batteries).

Thanks

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Pico Micropython overclocked twice (250MHz) works fine

Post by Roberthh » Fri Apr 30, 2021 6:08 am

I do not know of a specific firmware.250MHZ.uf2. You set the frequency with the generic v1.15 firmware at each startup, like in main.py. So add to main.py:

import machine
machine.freq(250_000_000)

If you look through the forum, you will also find hints to use even higher frequencies.

Tatito
Posts: 5
Joined: Tue Apr 27, 2021 3:58 pm

Re: Pico Micropython overclocked twice (250MHz) works fine

Post by Tatito » Fri Apr 30, 2021 6:08 pm

That firmware was linked in the opening post in this thread. Your suggestion solved the issue, thanks! (interestingly, it works for generic firmware: for firmware.250MHZ.uf2, machine.freq expects no arguments, i.e., can only be used to read the clock rate, not to modify it).
Thanks again for your help, it allowed me to finish off my little project :-) This is a great forum!

beyonlo
Posts: 58
Joined: Thu Nov 26, 2015 8:03 pm

Re: Pico Micropython overclocked twice (250MHz) works fine

Post by beyonlo » Fri Jun 10, 2022 2:26 am

After 1 year passed, is safe to run at 270Mhz?

I'm running some tests with 270Mhz and I have no problem, but I do not know if something can not works. Do you know?

Code: Select all

>>> from machine import freq
>>> import gc, time, array
>>> freq(270_000_000)
>>> freq()
270000000
>>> 
>>> import os
>>> os.uname()
(sysname='rp2', nodename='rp2', release='1.18.0', version='v1.18 on 2022-01-17 (GNU 11.2.0 MinSizeRel)', machine='Raspberry Pi Pico with RP2040')
>>> 

Thank you.

Post Reply