fivdi
Posts: 445
Joined: Sun Sep 23, 2012 8:09 pm
Contact: Website

Re: Overclocking Pico with up to 456MHz works

Sun Feb 07, 2021 8:16 pm

bleep42 wrote:
Sun Feb 07, 2021 7:19 pm
One question, how do you check what version of sdk I have?
Take a look at pico_sdk_version.cmake on your system to see.

To see what version of the SDK an application running on a Pico was compiled with, use the picotool:

Code: Select all

pi@raspberrypi:~/src/pico/blinky/build $ sudo picotool info -a
Program Information
 name:          blinky
 description:   Blink and Print
 features:      UART stdin / stdout
 binary start:  0x10000000
 binary end:    0x100062c0

Fixed Pin Information
 0:   UART0 TX
 1:   UART0 RX
 25:  On-board LED

Build Information
 sdk version:       1.0.0
 pico_board:        pico
 build date:        Feb  4 2021
 build attributes:  Debug

Device Information
 flash size:   2048K
 ROM version:  1
pi@raspberrypi:~/src/pico/blinky/build $ 

cleverca22
Posts: 3802
Joined: Sat Aug 18, 2012 2:33 pm

Re: Overclocking Pico with up to 456MHz works

Sun Feb 07, 2021 10:16 pm

https://docs.google.com/spreadsheets/d/ ... sp=sharing

Code: Select all

diff --git a/external/platform/pico/rp2_common/pico_stdlib/stdlib.c b/external/platform/pico/rp2_common/pico_stdlib/stdlib.c
index 28d5d386..e83c1b9b 100644
--- a/external/platform/pico/rp2_common/pico_stdlib/stdlib.c
+++ b/external/platform/pico/rp2_common/pico_stdlib/stdlib.c
@@ -7,6 +7,7 @@
 #include "pico/stdlib.h"
 #include "hardware/pll.h"
 #include "hardware/clocks.h"
+#include <kernel/thread.h>
 #if PICO_STDIO_UART
 #include "pico/stdio_uart.h"
 #else
@@ -37,6 +38,8 @@ void set_sys_clock_48mhz() {
 }

 void set_sys_clock_pll(uint32_t vco_freq, uint post_div1, uint post_div2) {
+    printf("set_sys_clock_pll(%d, %d, %d)\n", vco_freq, post_div1, post_div2);
+    thread_sleep(100);
     if (!running_on_fpga()) {
         clock_configure(clk_sys,
                         CLOCKS_CLK_SYS_CTRL_SRC_VALUE_CLKSRC_CLK_SYS_AUX,
and

Code: Select all

int set_sysclk(int argc, const console_cmd_args *argv) {
  if (argc != 2) {
    printf("usage: sysclock 133 (mhz)\n");
    return -1;
  }
  if (set_sys_clock_khz(argv[1].u * 1000, false)) {
    uart_init(uart0, 1000000);
    puts("success");
    return 0;
  } else {
    puts("failure");
    return -2;
  }
}
i grabbed an WIP branch of LK and tossed in a command to let me set the clock from the repl, and then modified the clock config code to print debug

Code: Select all

] sysclock 285
set_sys_clock_pll(1140000000, 4, 1)
success
] sysclock 286
failure
] sysclock 287
failure
] sysclock 288
set_sys_clock_pll(1440000000, 5, 1)
success
] sysclock 289
failure
] sysclock 290
failure
] sysclock 291
set_sys_clock_pll(1164000000, 4, 1)
success
] sysclock 300
set_sys_clock_pll(1500000000, 5, 1)
hardfault: HALT: spinning f
i can now just type in any number i want, and watch it either keep running, or crash&burn

Code: Select all

rp2040.core0 -- clearing lockup after double fault
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00

Thread 1 received signal SIGINT, Interrupt.
0xfffffffe in ?? ()
(gdb) bt
#0  0xfffffffe in ?? ()
#1  0x10008ba4 in out_count (len=36, str=0x1000de98 "HALT: spinning forever... (reason = %d)\n") at lib/io/console.c:64
#2  __debug_stdio_write (io=<optimized out>, s=0x1000de98 "HALT: spinning forever... (reason = %d)\n", len=36) at lib/io/console.c:87
#3  0x10008be8 in io_write (io=<optimized out>, buf=<optimized out>, len=<optimized out>) at lib/io/io.c:21
#4  0x100084ba in _fprintf_output_func (str=<optimized out>, len=<optimized out>, state=<optimized out>) at lib/libc/stdio.c:78
#5  0x10007fb0 in _printf_engine (out=out@entry=0x100084ad <_fprintf_output_func>, state=state@entry=0x20000084 <__stdio_FILEs+4>, fmt=0x1000debc "%d)\n", fmt@entry=0x99999999 "", ap=...)
    at lib/libc/printf.c:414
#6  0x1000854e in vfprintf (fp=fp@entry=0x20000084 <__stdio_FILEs+4>, fmt=fmt@entry=0x99999999 "", ap=..., ap@entry=...) at lib/libc/stdio.c:82
#7  0x10008566 in printf (fmt=0x1000de98 "HALT: spinning forever... (reason = %d)\n") at lib/libc/stdio.c:101
#8  0x1000679c in platform_halt (suggested_action=suggested_action@entry=HALT_ACTION_HALT, reason=reason@entry=HALT_REASON_SW_PANIC) at platform/power.c:35
#9  0x10000984 in hardfault (frame=0x20001ab0) at arch/arm/arm-m/exceptions.c:38
#10 <signal handler called>
#11 0x00000100 in ?? ()
gdb is also wired in, and i can see that it malfunctioned while in the middle of printing about the malfunction!

without any of the previously mentioned tricks (xip divisor, running from ram, over-volting), i can get it up to 291mhz, but some clocks like 280 and 282 are iffy, so i'm definitely into the unreliable zone

User avatar
HermannSW
Posts: 4131
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Overclocking Pico with up to 456MHz works

Mon Feb 08, 2021 2:48 pm

bleep42 wrote:
Sun Feb 07, 2021 7:19 pm
I've now got my Pico running, driving a string of 300 W2812 LEDs, looks like you are quite lucky, my figures for over clocking are:-
// 1.05v gives 266Mhz
// 1.15v gives 280Mhz
// 1.20v gives 290Mhz XXX doesn't work
// 1.30v gives 300Mhz

That's as high as I seem to be able to go with my silicon :-( Thought I do have a second, which I haven't tried yet. :-)
Can you please use copy_to_ram for your project and see whether you can overclock your Pico with 420MHz as well then?

Code: Select all

pi@raspberrypi400:~/pico/pico-examples/buildu/blink $ tail -1 ../../blink/CMakeLists.txt 
pico_set_binary_type(blink copy_to_ram) 
pi@raspberrypi400:~/pico/pico-examples/buildu/blink $ 
cleverca22 wrote:
Sun Feb 07, 2021 10:16 pm
without any of the previously mentioned tricks (xip divisor, running from ram, over-volting), i can get it up to 291mhz, but some clocks like 280 and 282 are iffy, so i'm definitely into the unreliable zone
What was the highest frequency you got with your Pico with running from ram (no_flash or copy_to_ram)?
Can you use 420000khz? 440000khz? 456000kkhz? Higher?

Please use "true" as second argument of set_sys_clock_khz() to be sure that asked for frequency really works (it asserts if not).
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
bleep42
Posts: 214
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex

Re: Overclocking Pico with up to 456MHz works

Mon Feb 08, 2021 4:52 pm

Hi Hermann,

Thanks, I've now tried loading to RAM, I can now get 440Mhz Max, though it may be unreliable as my program seems to stop after some random time, so I'll have to find the next lowest frequency, but otherwise not bad for something rated at 133!
I falsely assumed that the change to halve the Flash frequency would do the trick, rather than loading to RAM, but either I'm doing it wrong, or I was working under a false assumption. I have now found I have 1.0.1 of the SDK.

// 1.05v gives 266Mhz in Flash
// 1.15v gives 280Mhz in Flash
// 1.20v gives 291Mhz in Flash
// 1.30v gives 300Mhz Max in Flash

// 1.05v gives 266Mhz in RAM
// 1.15v gives 291Mhz in RAM
// 1.20v gives 360Mhz in RAM
// 1.30v gives 428Mhz in RAM reliably
// 1.30v gives 440Mhz Max in RAM, unreliable.

Thanks, Kevin.

kilograham
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 640
Joined: Fri Apr 12, 2019 11:00 am
Location: austin tx

Re: Overclocking Pico with up to 456MHz works

Mon Feb 08, 2021 6:15 pm

bleep42 wrote:
Mon Feb 08, 2021 4:52 pm
I falsely assumed that the change to halve the Flash frequency would do the trick, rather than loading to RAM, but either I'm doing it wrong, or I was working under a false assumption. I have now found I have 1.0.1 of the SDK.
How are you doing it?

User avatar
bleep42
Posts: 214
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex

Re: Overclocking Pico with up to 270MHz works

Mon Feb 08, 2021 6:34 pm

Hi Kilograham,
By using this below, but I now assume it only functions during boot up. If there is a way of running from the flash with flash running at half frequency? I'll give it a go, though how much will it slow down the running of the program? if it slows that down by half as well, there doesn't seem to be much point, though presumably if the program mainly fits in cache, who knows?
Regards Kevin.
kilograham wrote:
Tue Feb 02, 2021 3:49 pm
about about 270Mhz system clock you are probably out of range of the flash chip.

Do something like this in your CMakeLists.txt

Code: Select all

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)
to use a custom boot_stage2 which configures the flash slower (relative to system clock)

User avatar
bleep42
Posts: 214
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex

Re: Overclocking Pico with up to 456MHz works

Sat Feb 13, 2021 7:11 pm

Edit: Looks like it's a feature of my basic logic analyser, I had to fine tune the logic detection level, to be significantly different to when measuring the 200MHz and 100Mhz square wave, then I was able to detect the 133MHz signal. :-) So NFF.

I appear to have found a feature in the pio. Yes I know it's not in spec, just interesting.
If I run the clock at 400MHz and the pio with a divider of 1, so also 400Mhz, and perform a simple loop like so:

Code: Select all

.wrap_target
bitloop:
    nop            side 1 [ 0 ] ;
    jmp   bitloop  side 0 [ 0 ] ;
.wrap
I get a nice 200MHz square wave, however if I change the code to:

Code: Select all

.wrap_target
bitloop:
    nop            side 1 [ 1 ] ;
    jmp   bitloop  side 0 [ 0 ] ;
.wrap
I would hope to get a 133MHz not so square wave, but my logic analyser fails to find a signal.
I also tried a different version of code:

Code: Select all

.wrap_target
    nop            side 1 [ 0 ] ;
    nop            side 0 [ 0 ] ;
.wrap
Again I get a nice 200MHz square wave, if I change the code to:

Code: Select all

.wrap_target
    nop            side 1 [ 1 ] ;
    nop            side 0 [ 1 ] ;
.wrap
That gives me a nice 100MHz square wave.
However if I then try:

Code: Select all

.wrap_target
    nop            side 1 [ 0 ] ;
    nop            side 0 [ 1 ] ;
.wrap
Again no signal. :-(
If I change the PIO divider to 2, everything works as expected, except at half the frequency.
Interesting.
Regards, Kevin.

User avatar
HermannSW
Posts: 4131
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Overclocking Pico with up to 456MHz works

Sat Feb 13, 2021 9:18 pm

I cannot trust even my 400Msps logic analyzer with frequencies above 100MHz.
I use 110MHz rated digital oscilloscope with 1GS/s sampling rate to see what really is happening.
And even that has problems at least for >200MHz signals (OK, it is rated 110MHz).
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4131
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Overclocking Pico with up to 438MHz works

Mon Feb 15, 2021 8:35 am

Yesterday I published a simple tool that automatically determines the maximal safe overclocking frequency for a Pico.
This is hardware specific, so your mileage will vary:
viewtopic.php?f=145&t=303278&p=1820176#p1819896

Before I reported 456MHz in this thread, just changed the title.
Before only computation was checked.
The new test requires GP2 and GP3 being connected, and it is tested whether GPIO output and input works at a given frequency:

Code: Select all

      if (set_sys_clock_khz(cl, false))
      {
        set_sys_clock_48mhz(); sleep_ms(2); printf("\n");
        set_sys_clock_khz(cl, false);

        for(int i=0; i<4; ++i)
        {
          gpio_put(2,1); while (gpio_get(3)!=1) {}
          gpio_put(2,0); while (gpio_get(3)!=0) {}
        }
        set_sys_clock_48mhz(); sleep_ms(2); printf("found\n");
      }
USB does NOT work at such high frequencies, all printf()s are prepended with "set_sys_clock_48mhz()" as shown.


My three Picos can run at 296MHz/297.6MHz/308MHz at default voltage of 1.1V (Pico is rated 133MHz, runs at 125MHz default).

They can run at 426MHz/426MHz/438MHz at (maximal) voltage of 1.3V.

My bet would be that all Picos out there can do at least 420MHz [set_sys_clock_khz(420000, false)].

Even at minimal working voltage 0.9V Pico can be overclocked with 172.5MHz:
viewtopic.php?f=145&t=303278&p=1820176#p1820119


Here is test run for the Pico that can work at 438MHz (see the 438000 "found" message):
viewtopic.php?f=145&t=303278&p=1820176#p1820176
If a frequency is valid in principle, but GPIO does not work, then above shown code hangs in while loop.
That loop runs on core1, and hang gets detected by core0.
Then core0 resets and launches core1 again at next higher frequency (see "cl=" messages):
Peek_2021-02-15_09-06.gif
Peek_2021-02-15_09-06.gif
Peek_2021-02-15_09-06.gif (105.1 KiB) Viewed 1170 times
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
bleep42
Posts: 214
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex

Re: Overclocking Pico with up to 438MHz works

Mon Feb 15, 2021 1:36 pm

My Highest reliable clocks at various voltages, using your test program, in ram, shown below:-

11 = 1.10V = 307.2MHz
12 = 1.15V = 340MHz
13 = 1.20V = 372MHz
14 = 1.25V = 399MHz
15 = 1.30V = 428MHz

Regards, Kevin.
Last edited by bleep42 on Mon Feb 15, 2021 6:25 pm, edited 1 time in total.

zmarties
Posts: 66
Joined: Fri Jan 22, 2021 6:53 pm

Re: Overclocking Pico with up to 438MHz works

Mon Feb 15, 2021 6:03 pm

by HermannSW » Mon Feb 15, 2021 8:35 am
Yesterday I published a simple tool that automatically determines the maximal safe overclocking frequency for a Pico.
Are you able to make a prebuilt uf2 available, for those who would like to try your tool out without having to set up to build from source themselves?

User avatar
bleep42
Posts: 214
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex

Re: Overclocking Pico with up to 438MHz works

Mon Feb 15, 2021 6:30 pm

bleep42 wrote:
Mon Feb 15, 2021 1:36 pm
My Highest reliable clocks at various voltages, using your test program, in ram, shown below:-

11 = 1.10V = 307.2MHz
12 = 1.15V = 340MHz
13 = 1.20V = 372MHz
14 = 1.25V = 399MHz
15 = 1.30V = 428MHz

Regards, Kevin.
If I compile using the code you provided to run flash slower I now get:
11 = 1.10V = 282MHz
12 = 1.15V = 304MHz
13 = 1.20V = 312MHz
14 = 1.25V = 340MHz
15 = 1.30V = 402MHz
These are significantly less then yours, I have found these are very variable, you may need to run each voltage 8 times or more and one of them will be much lower than some of the others.
Regards, Kevin.

User avatar
HermannSW
Posts: 4131
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Overclocking Pico with up to 438MHz works

Mon Feb 15, 2021 6:52 pm

Running from RAM is more consistent than running from flash.
The code determining the maxial overclock frequency is not small, 40360 bytes (9da8):

Code: Select all

$ tail -7 multicore_hang.dis 
20009d98:	20004e6d 	.word	0x20004e6d
20009d9c:	2000408d 	.word	0x2000408d
20009da0:	20004771 	.word	0x20004771
20009da4:	20004dc9 	.word	0x20004dc9

20009da8 <__frame_dummy_init_array_entry>:
20009da8:	20000139                                9.. 
$
But the Pico has 264KB RAM, so why not use copy_to_ram without issues for applications that benefit from hard overclocking?

What would be helpful for verifying a specific frequency would be some kind of function test, consisting of GPIO write/read like I did minimally, but also testing other capabilities of Pico, eg. fifos between cores, peripherals, ... Such a function test could then be run at a determined voltage/frequency and used to verify whether frequency is really good or a slightly smaller frequency would be preferable,
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4131
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Overclocking Pico with up to 438MHz works

Mon Feb 15, 2021 7:11 pm

zmarties wrote:
Mon Feb 15, 2021 6:03 pm
by HermannSW » Mon Feb 15, 2021 8:35 am
Yesterday I published a simple tool that automatically determines the maximal safe overclocking frequency for a Pico.
Are you able to make a prebuilt uf2 available, for those who would like to try your tool out without having to set up to build from source themselves?
Sure -- just realized that .uf2 is so small that it can be attached here.
Attached is multicore_hang.uf2 created from what I pushed to my github fork, with copy_to_ram which achieves higher frequencies.
I just moved it somewhere, and did "make clean" and "make -j4". The newly generated .uf2 was identical to the one created before. Nice to have a deterministic build process.
Please use the attached multicore_hang.uf2 and let me know of any issues.
I had to use an allowed attachment file extension, gziping the .uf2 reduced from 81920 bytes to 30852 bytes.
Just store, run gunzip and flash to a Pico.
Attachments
multicore_hang.uf2.gz
multicore_hang.uf2.gz
(30.13 KiB) Downloaded 44 times
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4131
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Overclocking Pico with up to 436MHz works

Mon Feb 15, 2021 8:19 pm

OK, I determined maximal safe overclocking for voltages 0.90V..1.30V in 0.05V steps.
For my three Picos, and I took the values bleep42 measured:
Pico.safe_overclocking.values.png
Pico.safe_overclocking.values.png
Pico.safe_overclocking.values.png (7.4 KiB) Viewed 1028 times

Looks quite linear:
Pico.safe_overclocking.png
Pico.safe_overclocking.png
Pico.safe_overclocking.png (21.38 KiB) Viewed 1028 times

Just to remember:
Pico is rated 133MHz, and runs at default system clock 125MHz.
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
bleep42
Posts: 214
Joined: Wed Mar 07, 2012 12:43 pm
Location: Sussex

Re: Overclocking Pico with up to 436MHz works

Mon Feb 15, 2021 8:33 pm

That's a nice strait line, sort of shows the figures are probably about right. :-)
Regards Kevin

johanb
Posts: 2
Joined: Sat Apr 24, 2021 7:11 am

Re: Overclocking Pico with up to 270MHz works

Sat Apr 24, 2021 7:32 am

Hi
I am having difficulty figuring out how to set the below.
kilograham wrote:
Tue Feb 02, 2021 3:49 pm
about about 270Mhz system clock you are probably out of range of the flash chip.

Do something like this in your CMakeLists.txt

Code: Select all

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)
to use a custom boot_stage2 which configures the flash slower (relative to system clock)
This is what I have in "blink/CMakeLists.txt"

Code: Select all

add_executable(blink
        blink.c
        )

# Pull in our pico_stdlib which pulls in commonly used features
target_link_libraries(blink pico_stdlib)

# create map/bin/hex file etc.
pico_add_extra_outputs(blink)

# add url via pico_set_program_url
example_auto_set_url(blink)

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(blink slower_boot2)
And is this the output I get:

Code: Select all

[build] ELF2UF2 will need to be built
[build] CMake Error at blink/CMakeLists.txt:14 (pico_define_boot_stage2):
[build]   pico_define_boot_stage2 Function invoked with incorrect arguments for
[build]   function named: pico_define_boot_stage2
[build] 
[build] 
[build] CMake Error at blink/CMakeLists.txt:15 (target_compile_definitions):
[build]   Cannot specify compile definitions for target "slower_boot2" which is not
[build]   built by this project.
If I remove the

Code: Select all

pico_define_boot_stage2
Parts it builds again.

cleverca22
Posts: 3802
Joined: Sat Aug 18, 2012 2:33 pm

Re: Overclocking Pico with up to 436MHz works

Sat Apr 24, 2021 5:37 pm

replace slower_boot2 with blink
that part needs to always match the local project name

kilograham
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 640
Joined: Fri Apr 12, 2019 11:00 am
Location: austin tx

Re: Overclocking Pico with up to 436MHz works

Sat Apr 24, 2021 6:10 pm

cleverca22 wrote:
Sat Apr 24, 2021 5:37 pm
replace slower_boot2 with blink
that part needs to always match the local project name
It needs to match the name of the target as defined by add_executable or add_library

johanb
Posts: 2
Joined: Sat Apr 24, 2021 7:11 am

Re: Overclocking Pico with up to 436MHz works

Mon Apr 26, 2021 5:37 am

Hi thanks for the replies,

This is how I tried it the first time, alas it still complains.

Code: Select all

add_executable(blink
        blink.c
        )
# Pull in our pico_stdlib which pulls in commonly used features
target_link_libraries(blink pico_stdlib)
# create map/bin/hex file etc.
pico_add_extra_outputs(blink)
# add url via pico_set_program_url
example_auto_set_url(blink)

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

Code: Select all

[build] CMake Error at blink/CMakeLists.txt:14 (pico_define_boot_stage2):
[build]   pico_define_boot_stage2 Function invoked with incorrect arguments for
[build]   function named: pico_define_boot_stage2
[build] 
[build] 
[build] PIOASM will need to be built
[build] -- Configuring incomplete, errors occurred!

cleverca22
Posts: 3802
Joined: Sat Aug 18, 2012 2:33 pm

Re: Overclocking Pico with up to 436MHz works

Sun May 09, 2021 1:24 pm

aallan wrote:
Sun May 09, 2021 12:57 pm
3 PICO UK RP2-B1 20/38 P64M16.00
4 PICO UK RP2-B1 20/43 P65A42.00
5 PICO Malaysia RP2-B0 20/34 P64M15.00 TTT
6 PICO USA RP2-B1 20/38 P64M16.00
7 Pimoroni Tiny 2040 UK RP2-B1 20/43 P65A42.00
8 Adafruit ItsyBitsy 2040 USA RP2-B1 20/43 P65A42.00
TTT signifies "typical" silicon, i.e. it's not corner silicon, https://en.wikipedia.org/wiki/Process_corners.
https://en.wikipedia.org/wiki/Process_corners wrote: A circuit running on devices fabricated at these process corners may run slower or faster than specified and at lower or higher temperatures and voltages,
it may be interesting to check if you have a TTT chip, and see how its overclock compares to a non-TTT chip

Return to “SDK”