SPI/Wider belts/Dual SPI
Lesson 11 of 14 · in 3D and VR

Dual SPI

Dual SPI turns the two data wires round so both point the same way, and a byte takes four clocks instead of eight. The cost is talking and listening at once.

Lonely BinaryUpdated 2026-09-304 min readNo board required

View it in VR

Lesson 11 of the SPI course opens in a VR headset, on a table in front of you, and a voice starts three seconds after you arrive. Type this short address into the browser on a headset such as Meta Quest or Apple Vision Pro, and press Enter VR. No headset? Press Start the lesson: the same lesson, full screen.

learn.lonelybinary.com/vr/spi/11

Reading a flash chip uses only half of SPI. The controller sends a command and an address, and then the chip does all the talking, while the controller's MOSI carries dummy bits nobody looks at.

Two bits a clock

Dual SPI puts that idle wire to work. After the command, both data wires carry the peripheral's bits, one each per clock, so a byte takes four clocks. The Winbond W25Q128 datasheet says its dual instructions, 0x3B and 0xBB, turn the DI and DO pins into bidirectional pins named IO0 and IO1.

The command still goes out on one line, and only the data uses two.

The same pins

There are no new wires. IO0 is where MOSI was and IO1 is where MISO was, renamed because they no longer mean controller-out and controller-in. Which side drives them changes during the transfer.

You have used it

An ESP32 reads its own program flash over SPI. The esptool documentation says the flash chip first starts in a dual mode, and that the software then tries to switch on quad. Every time a board starts, it starts with Dual SPI.

Dual SPI is mostly met as a read mode of flash chips such as the W25Q128, and not as a kind of device of its own.

What it costs

With both wires pointing one way, nobody is listening on the way back. A transfer on more than one data line is half-duplex: the controller speaks or the peripheral speaks, and the bus turns round between. ESP-IDF says a transaction with more than one data line must be set half-duplex.

That suits reading a flash, where one side talks for a long time. It does not suit a sensor that swaps a byte each way.

Common mistakes

  • Expecting every read to be twice as fast. The command and address still use one line, and only the data phase gains.
  • Sending a dual instruction to a part with no IO1. Only a part whose datasheet names IO0 and IO1 takes one, and the plain read 0x03 stays on one line.
  • Leaving the driver in full-duplex. ESP-IDF wants SPI_DEVICE_HALFDUPLEX when more than one line transmits.

Edit this page — content/fundamentals/spi/dual-spi.mdx

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Fundamentals on the forum →