QSPI (Quad Serial Peripheral Interface)
📘 QSPI (Quad Serial Peripheral Interface)
1️⃣ Concept
QSPI (Quad SPI) is an extended version of the standard SPI (Serial Peripheral Interface) protocol. It increases data throughput by expanding the data bus from 1 bit to 4 bits.
In standard SPI, data is transferred using MOSI (Master Out Slave In) and MISO (Master In Slave Out), which means 1 bit per clock. In QSPI, these lines are replaced by IO0 ~ IO3, allowing 4-bit parallel data transfer, achieving up to 4× higher throughput than regular SPI without increasing the clock frequency.
2️⃣ Signal Lines
| Signal | Description |
| CS (Chip Select) | Selects the slave device (active low) |
| CLK (Clock) | Clock signal generated by the master |
| IO0 ~ IO3 | Data lines used for transmit/receive |
Unlike standard SPI (which has fixed MOSI/MISO directions), IO0–IO3 are bidirectional and change direction depending on the transfer phase.
3️⃣ Transfer Phases
Although the exact sequence varies by flash manufacturer, QSPI transactions generally follow three phases:
| Phase | Description |
| Command Phase | Sends the opcode (usually transmitted in Single mode) |
| Address Phase | Sends the target memory address (Single, Dual, or Quad) |
| Data Phase | Transfers actual data (Single / Dual / Quad mode) |
Example: Reading from QSPI Flash
Send
0xEB(Fast Read Quad I/O Command)Send 3-byte address
Insert required dummy cycles
Receive data in Quad mode
4️⃣ Example Read Sequence
CS = Low
Command: 0xEB (Single Line)
Address: 0x00 0x10 0x00 (Quad Line)
Dummy: 8 cycles
Data: [0x12][0x34][0x56]... (Quad Line)
CS = High
Once the command is issued, the flash outputs data using 4 data lines in parallel, increasing read speed.
5️⃣ Advantages
High throughput without increasing clock frequency
Supports XIP (Execute In Place) on some MCUs, enabling direct code execution from flash
More pin-efficient than parallel flash memory
6️⃣ Disadvantages
More complex hardware routing due to timing requirements on 4-bit data lanes
Command sets differ between vendors (e.g., Winbond, Micron, ISSI)
Not all MCUs support DMA or memory-mapped mode for QSPI
7️⃣ Common Commands (Winbond W25Q Series Example)
| Command | Opcode | Description | Data Width |
| Read Data | 0x03 | Standard/slow read | 1-bit |
| Fast Read | 0x0B | Faster read + dummy | 1-bit |
| Dual Read | 0x3B | Read using 2 data lines | 2-bit |
| Quad Read | 0x6B | Read using 4 data lines | 4-bit |
| Page Program | 0x02 | Write data to flash page | 1-bit |
| Sector Erase | 0x20 | Erase 4KB flash sector | 1-bit |
8️⃣ Summary
SPI → 1-bit serial data transfer
QSPI → 4-bit parallel transfer (up to 4× throughput)
Used mainly for external flash, firmware storage, and bootloaders
Some MCUs support XIP mode to execute code directly from QSPI flash