polpo / rp2040-psram

A header-only C library to allow access to SPI PSRAM via PIO on the RP2040 microcontroller.
MIT License
134 stars 13 forks source link

Add example (ram test) output to README #9

Open paulie-g opened 1 year ago

paulie-g commented 1 year ago

Thanks for the fantastic work.

For those of us who are considering RP2040+PSRAM as a solution for a project and don't have a PSRAM chip handy to run the test ourselves, it would be very useful if the README (main or in /examples) provided the output from a psram-test run on your, or other, known-good hardware.

In simple terms, it would be useful to know ahead of time what sort of performance we can expect (at least the top end limit, obviously using DMA/internal RAM might interfere in real world use cases).

gtortone commented 8 months ago

RP2040 - no overclock

8 bit: PSRAM write 8MB in 5637183 us, 1488085 B/s
8 bit: PSRAM write async 8MB in 5637182 us, 1488085 B/s
8 bit: PSRAM read 8MB in 12079635 us, 694442 B/s
16 bit: PSRAM write 8MB in 3355488 us, 2499966 B/s
16 bit: PSRAM read 8MB in 7046470 us, 1190469 B/s
32 bit: PSRAM write 8MB in 2466296 us, 3401298 B/s
32 bit: PSRAM read 8MB in 4093681 us, 2049160 B/s
128 bit: PSRAM write 8MB in 1358994 us, 6172660 B/s
128 bit: PSRAM read 8MB in 2100338 us, 3993932 B/s

RP2040 - sysclk 250 MHz

8 bit: PSRAM write 8MB in 2819100 us, 2975633 B/s
8 bit: PSRAM write async 8MB in 2818593 us, 2976168 B/s
8 bit: PSRAM read 8MB in 4966075 us, 1689182 B/s
16 bit: PSRAM write 8MB in 1677742 us, 4999939 B/s
16 bit: PSRAM read 8MB in 3070250 us, 2732223 B/s
32 bit: PSRAM write 8MB in 1107315 us, 7575629 B/s
32 bit: PSRAM read 8MB in 1837123 us, 4566165 B/s
128 bit: PSRAM write 8MB in 679495 us, 12345356 B/s
128 bit: PSRAM read 8MB in 987252 us, 8496927 B/s