Skip to main content

Command Palette

Search for a command to run...

QSPI (Quad Serial Peripheral Interface)

Published
3 min read

📘 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

SignalDescription
CS (Chip Select)Selects the slave device (active low)
CLK (Clock)Clock signal generated by the master
IO0 ~ IO3Data 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:

PhaseDescription
Command PhaseSends the opcode (usually transmitted in Single mode)
Address PhaseSends the target memory address (Single, Dual, or Quad)
Data PhaseTransfers actual data (Single / Dual / Quad mode)

Example: Reading from QSPI Flash

  1. Send 0xEB (Fast Read Quad I/O Command)

  2. Send 3-byte address

  3. Insert required dummy cycles

  4. 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)

CommandOpcodeDescriptionData Width
Read Data0x03Standard/slow read1-bit
Fast Read0x0BFaster read + dummy1-bit
Dual Read0x3BRead using 2 data lines2-bit
Quad Read0x6BRead using 4 data lines4-bit
Page Program0x02Write data to flash page1-bit
Sector Erase0x20Erase 4KB flash sector1-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


More from this blog

psk-study

134 posts