What are Dual, Quad and Octal SPI?
Short answer: They are SPI extensions that transfer 2, 4 or 8 bits per clock using bidirectional data lines (IO0–IO7) instead of a single MOSI/MISO pair, multiplying throughput. Quad SPI (QSPI) NOR flash is the standard way to add external code and data storage to MCUs, and many controllers support execute-in-place (XIP), mapping the flash into the address space so the CPU can run code directly from it. Octal SPI and HyperBus reach hundreds of MB/s for external RAM and frame buffers.
| Variant | Data lines | Example throughput |
|---|---|---|
| Single SPI | 1 out + 1 in | 50 MHz → ~6 MB/s |
| Dual | 2 (half duplex) | ~12 MB/s |
| Quad (QSPI) | 4 | 133 MHz → ~66 MB/s |
| Octal (OSPI, DDR) | 8, both edges | 200 MHz DDR → ~400 MB/s |
How a quad read works: the command byte may be sent on one line (1-1-4 mode) or all four (4-4-4), followed by the address, dummy cycles (for the flash to fetch data), then data on four lines. The x-y-z notation means lines used for command-address-data.
Memory-mapped mode / XIP: the controller automatically issues read commands when the CPU accesses the mapped address range. Combined with a cache (Cortex-M7) this gives reasonable performance for code and graphics assets.
Design considerations
- Use the controller's memory-mapped mode for reads; writes and erases still go through command mode, and you cannot execute from the flash while it is being erased/programmed (run that code from RAM).
- Some flash chips need the QE (quad enable) bit set in a status register before quad modes work.
- Signal integrity at 100+ MHz needs short, matched traces.
- Bootloaders must configure the QSPI controller before jumping to code in external flash.
- Encrypted XIP (on-the-fly decryption, e.g. NXP BEE/OTFAD, ST OTFDEC) protects firmware stored externally.