Wondering how to overclock rp2040 to 240mhz on platformio, and looking for advice on speeding up file reading. #1618
-
Firstly, I write this at the top of main.cpp:
Then modify platfomio.ini:
But it doesn't work. No serial port appears at all on my computer. Same the Blink test. I'm sure my rp2040 can be overclocked to 240mhz cause I overclocked it successfully using microropython's machine.freq(240000000). In terms of file reading, littlefs is too slow for me. It takes about 20ms to read a 1kb file, while it takes me only 7ms to read the same file using fatfs on esp32c3@160mhz. My programme is quite time sensitive, and reading a file should take at least less than 7ms.
Is it possible to use SDFS on the on-board flash? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
First problem has been solved. I think I may have bought a one-to-one copy of the YD RP2040. Also the configuration of the YD RP2040 seems to be wrong, the YD RP2040 doesn't come in a version with 2MB of flash, and the interface isn't SPI, but QSPI. (Maybe this configuration refers to another version, the YD RP2040 Lite, which has only 2MB of flash.) In my case, the setup of 240Mhz@W25Q080/4 works well. |
Beta Was this translation helpful? Give feedback.
-
For those who suffer from the same read speed problem, I tried to port a read-only fatfs to the rp2040 (writing seems impossible due to the use of XIP). Reading a 700 byte file at 200mhz @ divder = 2 takes about 1ms. For me at least, this is already faster than I thought possible. More tests are still needed to see if reading more than 1024 bytes slows it down. |
Beta Was this translation helpful? Give feedback.
Flash speed is decided by CPU frequency and Boot2 file. The
_2_
in the Boot2 file name means the code is for a SPI clock frequency divider of "2", i.e., CPU frequency divided by 2. "4" respectively for DIV 4. A Pico with 7ms read time compared to 12ms on an ESP32 seems understandable to me, after all, the Pico is only Cortex M0+ with no hardware integer divider and the code may need a few of those. The ESP32C3's RISC-V (RV32IMC) core is better in regards to that.Note: With the ZB25VQ32BSIG, you have