Page 2 of 2

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

Posted: Thu Apr 29, 2021 10:43 pm
by Tatito
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

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

Posted: Fri Apr 30, 2021 6:08 am
by Roberthh
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.

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

Posted: Fri Apr 30, 2021 6:08 pm
by Tatito
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!