Skip to content

Conversation

@shtirlic
Copy link

@shtirlic shtirlic commented Aug 18, 2025

The code is pretty rough and you have to enter normal spi mode to switch to qpi mode before working or have to exit qpi mode and enter spi mode. Suggestions are always welcome.

Some tests:

rp2350 RISC-V core ESP-PSRAM64H on PicoCalc board (https://www.clockworkpi.com/picocalc) with Pico 2

sysclock 150mhz

Testing PSRAM(SPI)...
16 bit: PSRAM write 8MB in 3299527 us, 2542366 B/s
16 bit: PSRAM read 8MB in 6263501 us, 1339284 B/s
32 bit: PSRAM write 8MB in 2306877 us, 3636348 B/s
32 bit: PSRAM read 8MB in 3704978 us, 2264145 B/s
128 bit: PSRAM write 8MB in 1250219 us, 6709711 B/s
128 bit: PSRAM read 8MB in 1613943 us, 5197586 B/s
Testing PSRAM(QSPI)...
16 bit: PSRAM write 8MB in 2963981 us, 2830182 B/s
16 bit: PSRAM read 8MB in 4026536 us, 2083331 B/s
32 bit: PSRAM write 8MB in 1761612 us, 4761893 B/s
32 bit: PSRAM read 8MB in 2278914 us, 3680967 B/s
128 bit: PSRAM write 8MB in 774859 us, 10825980 B/s
128 bit: PSRAM read 8MB in 768089 us, 10921401 B/s

sysclock 230mhz

Testing PSRAM(SPI)...
16 bit: PSRAM write 8MB in 2151866 us, 3898294 B/s
16 bit: PSRAM read 8MB in 4084893 us, 2053568 B/s
32 bit: PSRAM write 8MB in 1504485 us, 5575734 B/s
32 bit: PSRAM read 8MB in 2416290 us, 3471689 B/s
128 bit: PSRAM write 8MB in 815360 us, 10288226 B/s
128 bit: PSRAM read 8MB in 1052571 us, 7969636 B/s
Testing PSRAM(QSPI)...
16 bit: PSRAM write 8MB in 1933030 us, 4339616 B/s
16 bit: PSRAM read 8MB in 2626002 us, 3194440 B/s
32 bit: PSRAM write 8MB in 1148877 us, 7301572 B/s
32 bit: PSRAM read 8MB in 1486247 us, 5644154 B/s
128 bit: PSRAM write 8MB in 505343 us, 16599830 B/s
128 bit: PSRAM read 8MB in 500928 us, 16746135 B/s

@shtirlic shtirlic mentioned this pull request Aug 18, 2025
@polpo
Copy link
Owner

polpo commented Aug 18, 2025

Thank you very much for submitting this PR! I will try this on my QSPI test board and report back. Regarding needing to enter SPI mode before quad, I tried some hacks with faking serial writes while in quad mode when I was playing with QSPI back in the day, maybe I can find some of my old code for that.

@cederom
Copy link

cederom commented Aug 18, 2025

I just ordered Feather RP2350 will test when it arrives :-)

@polpo
Copy link
Owner

polpo commented Aug 18, 2025

@cederom - FYI the Feather RP2350 and most other RP2350 boards with PSRAM support put the PSRAM on the same QSPI bus as the flash chip. This is to use the built-in support that maps the PSRAM into memory. Because this library drives the PSRAM via PIO it will not work on those boards unless you wire a PSRAM chip to GPIO pins.

@cederom
Copy link

cederom commented Aug 18, 2025

ouch, thanks @polpo, will obtain psram chip and attach to gpio somehow :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants