How to choose a memory IC for an STM32 microcontroller?


here's how to choose a memory IC for an STM32 microcontroller, depending on your use case. STM32 MCUs often benefit from external memory when on-chip flash/RAM isn't enough or persistent storage is needed.
Choosing a Memory IC for STM32
Common STM32 Use Cases
Use Case | External Memory Needed? |
Running large firmware | (QSPI NOR Flash, Execute-in-Place) |
Logging sensor data | (SPI NAND/EEPROM/SD card) |
Storing configuration | (EEPROM or FRAM) |
Image/audio/video buffer | (SRAM or SDRAM) |
AI / ML / FFT processing | (PSRAM, SDRAM) |
Bootloader or firmware update | (SPI NOR Flash) |
External Flash Memory for Firmware / Code
Type | Recommended For | Example ICs |
SPI NOR Flash | Firmware storage, XIP (Execute-In-Place) | Winbond W25Q128JV (16 MB), Macronix MX25L128 |
QSPI NOR Flash | High-speed XIP or code execution | Micron N25Q128A, Winbond W25Q64JVSSIM |
Parallel NOR Flash | Legacy or very fast access systems | Not typical in modern STM32 designs |
STM32F7, H7, and L4 series support QSPI with memory-mapped mode, enabling code execution from external flash.
External RAM for Data Buffering / Processing
Type | Recommended For | Example ICs |
SRAM (Static RAM) | Small, fast memory (<1MB) | Alliance AS6C62256, Cypress CY62167 |
SDRAM (Synchronous DRAM) | High-speed frame/data buffers | IS42S16400J, MT48LC16M16 |
PSRAM (Pseudo-SRAM) | Large memory + ease of use | APS6404L (4MB), ESP PSRAM64H |
STM32F7, H7, and some L4 series support FMC (Flexible Memory Controller) or OctoSPI for interfacing with SRAM/SDRAM.
EEPROM / FRAM for Config/Data Storage
STM32s don't have internal EEPROM (except STM32L series), so external non-volatile memory is often used.
Type | Use | Example ICs |
EEPROM | Small, infrequent writes | Microchip 24LC256 (I2C), AT25C256 (SPI) |
FRAM | Frequent updates, low latency | Fujitsu MB85RS256 (SPI), Cypress FM25L04 |
Use I2C or SPI depending on available STM32 pins and speed requirements.
Large Data Storage (e.g. logs, SD card)
Type | Use Case | Example ICs or Options |
NAND Flash | Raw storage, FAT FS | Micron MT29F1G08AB (1Gb), requires wear leveling |
SD Card | FAT32 file systems | Standard microSD cards (SPI or SDIO mode) |
eMMC | Embedded, soldered SD | Kingston EMMC08G-M627 |
STM32 HAL + FatFS can be used with SPI, SDIO, or USB Mass Storage.
Interface Support by STM32
Memory Type | Interface Options | Notes |
NOR Flash | SPI, QSPI, OctoSPI | Use memory-mapped mode for XIP |
EEPROM | I2C, SPI | Easy to interface |
FRAM | SPI, I2C | High endurance |
SDRAM | FMC interface | Needs pin-rich STM32 (F7, H7, etc.) |
SD Card | SPI or SDIO | Built-in STM32 SDIO peripheral |
Real-World Memory Pairing Examples
STM32 Model | Memory Extension Use Case | Memory IC Suggestion |
STM32F103 | Add config storage | 24LC256 (EEPROM, I2C) |
STM32F407 | Add buffer / frame memory | IS42S16400J (SDRAM, FMC) |
STM32F767 | Boot from external QSPI flash | W25Q128JV (QSPI NOR Flash) |
STM32H743 | Log data + AI image buffer | APS6404L (PSRAM), W25Q256JV (Flash) |
STM32L432 | Low-power config storage | MB85RC256V (FRAM, I2C) |
Final Checklist
What do you want to store? (Code, config, logs, images?)
Volatile or non-volatile?
How much memory is needed?
Speed requirements?
Available pins/interfaces on your STM32?
Endurance and power constraints?
Subscribe to my newsletter
Read articles from ampheo directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
