Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8621

General • Re: PSRAM with RP2350B

$
0
0
I wondered why my data rates was so low (2.41 MB/s cached and 5.70 MB/s uncached), this should be the reason.
Do you have some examples of configuration to enable quad spi and better timings/rates?
I just spent some time getting PSRAM to "work". It requires bit more setup to get PSRAM configured to use "Quad" mode that gives decent transfer speeds.

How I ended up doing it can be found here: https://github.com/tjko/fanpico/blob/main/src/psram.c

Basically you can detect the presence of PSRAM by issuing "Read ID" command (in SPI mode)), that gives 8 byte response that includes manufacturer ID and chip "density" (size) information along with undocumented data (presumably chip ID/serial number).

Then based on this information you can configure RP2350 registers (M1_TIMING, M1_RFMT, M1_RCMD, M1_WFMT, M1_WCMD) to get chip working in "Quad" mode.

To get decent speeds you'd want to get the "clock" for the PSRAM to be close to rated maximum (109MHz for AP Memory chips at 3.3V or 104MHz for ISSI chips). I ended up running RP2350 at 200MHz and using clock divider 2, to get PSRAM running at 100MHz, which made significant improvement on access speed.

(some test results from my testing is found here: viewtopic.php?t=390296#p2328480)
Thank you for your detailed answer.
So is more that I was afraid of: adding a PSRAM module is not that simple and involves developping nothing less than a driver to achieve decent performances.
I hope this will be added in the SDK or in examples.

Statistics: Posted by laurent — Mon Jul 28, 2025 9:38 am



Viewing all articles
Browse latest Browse all 8621

Trending Articles