Teensy 4.1 PSRAM and SPI Flash

Status
Not open for further replies.

us3r

New member
I have a Teensy 4.1, two PSRAM 8MB each and one 16MB SPI Flash.
My dilemma is: Which combination should I solder on the Teensy 4.1 (before soldering the headers) and why.
Do I really need the SPI Flash if I can use the μSD card?
I would appreciate an input from the community as to which combination is likely to be the most useful.
Thanks!
 
It really depends on what sort of applications you will develop.

Most programs use RAM1 for nearly all variables and RAM2 for buffers and larger arrays. Sometimes the PSRAM is really needed when you just can't fit your usage into the 1MB on chip. But the PSRAM is so much slower (except most access usually hits the fast M7 cache) that many programs don't make a lot of use.

Then again, if you're doing something like buffering audio or other fast data before writing to SD, or a large graphics frame buffer, or other special applications where a large memory buffer is needed, the PSRAM can be quite handy. The common scenario is most or all of the PSRAM used for some special buffer or data array, and all other variables in the normal RAM1 & RAM2 memory.

Much has been said lately of performance using LittleFS on QSPI versus SD cards using SdFat versus MSC media on USB host. Latest beta have LittleFS which can use part of the program memory too, though doing writes to program memory stalls your code, so that's probably best for things you'll store once and usually only read.

I don't have answers for you, but rather some suggestions of the questions you should ask. The main question is whether your usage of storage media will be mostly writing (like data logging) or mostly reading (like accessing infrequently changed resources like sound clips, images, fonts, etc). How you actually intend to use the storage media plays a strong role in deciding which is best for you.
 
Thank you Paul!
I intend to use the PSRAM to buffer large images, video, or addressable LED matrix data (with a lot of LEDs).
I am not interested in data-loging, but I want an easy way to store the images/video/data and I think μSD would be best for me to do that.
I guess, I can solder one of the two 8MB PSRAM I have, and "play by ear".
If I need more PSRAM I can add it later.
If I need to add SPI Flash for whatever unforeseeable reason, I have that option too.
I shouldn't be concerned for the headers being in the way when I need to fit onto the board another chip (either a second PSRAM or SPI Flash).
So, for the time being, one 8MB PSRAM is a good starting point.

Thank you Frank B.
I may not need them for most applications, but one of the reasons I consider adding one PSRAM onto the board is that it also gives me the opportunity to tinker with it an learn how it works with the code.
 
Last edited:
Indeed the one smaller QSPI pad set is limited to use for PSRAM - putting it there now will allow using it for testing etc.

It does get hard to solder ( at least as I see it ) once the pin headers are installed
 
Status
Not open for further replies.
Back
Top