avatar

EYE on NPI - ISSI's Serial and Quad PSRAM chips

Adafruit Industries
Adafruit Industries
Episode • Apr 18, 2024 • 8m
Psst...this week's EYE ON NPI is no secret, and despite having the word "Pseudo" in the name, it's the Real Deal: This week it's ISSI's Serial and Quad PSRAM chips (https://www.digikey.com/en/product-highlight/i/issi/serial-ram-and-quad-ram-solutions), an excellent addition to your next microcontroller board to quickly boost your RAM stack to megabyte proportions!
Microcontrollers have come a long way since 8-bit chips like the ATmega328 (https://www.adafruit.com/product/123). What used to be a luxurious 32 KB of flash memory and 2 KB of SRAM is now nowhere-near-enough storage for handling the big computation requirements we're trying to squeeze into embedded products. It used to be enough to handle some buttons, blink a few LEDs, maybe at best read a sensor and control a motor. Now we need internet connectivity, full graphics support, and machine learning algorithms running on large sensor data sets!
As we've seen, microcontrollers have evolved from 8-bit AVR to Cortex M0 to Cortex M4 and even M7 - or if you're a fan of Espressif chips, Tensilica/RISC-V 240 MHz processors. But what you are paying for in a microcontroller is often related to the density and size of the die, and on many processors, the RAM and FLASH can start to take up a dominant amount of die real-estate. SRAM and Flash may also require larger nm 'processes' that are harder to book. As a result, we're seeing chips like the RP2040 (https://www.digikey.com/en/products/detail/raspberry-pi/SC0914-13/14306010) that have on-chip SRAM but no longer have on-chip Flash memory. Instead, you're expected to pick up a QSPI flash chip and wire it up to the 6-pin interface. By clever usage of on-chip instruction cache, you can get close to on-board FLASH speeds but with the flexibility and size of external memory: it's hard to find a chip with more than 1 MB of internal FLASH but you can easily get 16 MB of external memory like the ISSI IS25WP128 (https://www.digikey.com/en/products/detail/issi-integrated-silicon-solution-inc/IS25WP128-JBLE/5431600) for only a couple bucks!
OK now you've got plenty of space for your code, but what about RAM? That's where you'll be buffering graphics, storing data to process, or for IoT products, storing large packets of data that may need to be encrypted before sending/receiving. SRAM is also big and kinda expensive, so it's no surprise that many advanced processors these days also support external RAM chips.
Now, most folks aware that microprocessors (as opposed to microcontrollers) have required external RAM for quite a long time - but often those used large DRAM chips with 8, 16 or 32-bit parallel interfaces like the IS42 series (https://www.digikey.com/en/products/detail/issi-integrated-silicon-solution-inc/IS42S16400J-7TL/2708623). These of course are not going to work when you only have 32-ish GPIO available.
That's where 8-pin PSRAM chips come in - and we're starting to see lots of 'low pin count' microcontrollers support these. For example the iMX RT1062 (https://www.digikey.com/short/0fhbdwv0) used in the Teensy 4.1 (https://www.adafruit.com/product/4622) supports PSRAM - check the SOIC-8 footprint on the bottom. Likewise the ESP32 series has wide support for PSRAM, their modules come with 8-SOIC 2MB chips very often. The extra PSRAM comes in handy when doing large IoT projects where you have to buffer an entire image, or JSON structure. Especially over TLS connections that require a lot of RAM to process!
Note that while you could use the ISSI PSRAM chips with any processor, thanks to the generic SPI or QSPI interface, you really do want a chip to have 'native' PSRAM support so that the compiler and core will automatically map the PSRAM out so it is accessed transparently to your code. You'll likely need to enable PSRAM support in your toolchain and of course wire it up to the supported QSPI interface pins. Also, sometimes you need to be careful about where some memory goes, like volatile or interrupt-accessed addresses. Somet