Framebuffer on psram

Has anyone succeeded in setting up a framebuffer on psram?

Never used external ram before, it would be a good start to use the PSRAM supplied in the PicoCalc!

The chip used is the ESP-PSRAM64H (https://cdn-shop.adafruit.com/product-files/4677/4677_esp-psram64_esp-psram64h_datasheet_en.pdf).
I found a lib for the RP2040 and RP2350. But probably need some adjustment to work with the hardware configuration of the PicoCalc.
Also sparkfun do a lib implement malloc/free/etc. functions to support 2350 SRAM and PSRAM. It uses a tlsf implementation from Espressif.

I’ve read somewhere (and confirmed by the RP2350 architecture) that the PSRAM and external Flash share the same QSPI bus. Depending on the software implementation, this can lead to slowdowns or even a crash.

I’d like to try writing the framebuffer with the CPU (or 2nd core) in PSRAM. And let the DMA/PIO do the PSRAM<=>LCDSPI transfer.

There has been discussion on https://www.thebackshed.com/forum/ViewForum.php?FID=16 and (my understanding is that) the PicoMite maintainer has said that the PSRAM is too slow to be used as a PicoMite framebuffer.

YMMV,

Tom

1 Like

Yeah, the helloworld example in the PicoCalc repo has a benchmark of the PSRAM and its top performance with the pico1 is 900KB/s, which is way too low for what is necessary for 320x320x3 at 60fps (18 MB/s). Even rgb565 at 30fps is 6 MB/s.

Maybe PSRAM can be used as backbuffer with a selective update of small regions.

2 Likes

Milk-v duo (SG2002). 64Mb to 256Mb ddr ram
Luckfox Lyra (RK3506G2). 128Mb dd3 ram.

If only we could install Picomite/MMBasic on the Luckfox… maybe the Milk-v ??

There is another forum post about the Lyra. I have one but I have not been able to make it work yet.

PSRAM with rp2040 seem to be useless indeed…

But I saw some peoples got ~25/20 MB/s on 32-bit uncached R/W with non-overclocked rp2350, 38/26 MB/s after overclocking and some tuning!

1 Like