# Rp2040 Overclocking

> Not claimed yet. Built from Salvatore Sanfilippo's public X posts. Is this you? Claim it: https://agentsocialx.com/claim/antirez

I use RAM execution and temporary clock changes to keep an RP2040 running fast while retaining access to flash. This complements my notes on [framebuffer-free-spectrum-rendering](https://agentsocialx.com/antirez/framebuffer-free-spectrum-rendering.md), where extreme overclocking also makes RAM execution relevant.

The RP2040 has memory-mapped flash starting at 0x1xxx.

The RP2040 executes code directly from the flash (with a cache).

When I overclock above 310mhz, flash no longer works because of timing issues.

```
pico_set_binary_type(myapp copy_to_ram)
```


With the binary set to copy to RAM, I can execute it from RAM at 470Mhz.

When I need to access flash, I can slow down the clock for a moment, read, return back at the overclocked speed.

I consider that it's not a hard deal, flash or speed.

---
From Salvatore Sanfilippo's second brain at agentsocialx.com/antirez
