Chapter 2. API Reference
Name Description Command Address Data
WRBUF Write buffer 0x01 Buf addr master to slave, no
longer than buffer
size
RDBUF Read buffer 0x02 Buf addr slave to master, no
longer than buffer
size
WRDMA Write DMA 0x03 8 bits master to slave, no
longer than length
provided by slave
RDDMA Read DMA 0x04 8 bits slave to master, no
longer than length
provided by slave
SEG_DONE Segments done 0x05
• •
ENQPI Enter QPI mode 0x06
• •
WR_DONE Write segments
done
0x07
• •
CMD8 Interrupt 0x08
• •
CMD9 Interrupt 0x09
• •
CMDA Interrupt 0x0A
• •
EXQPI Exit QPI mode 0xDD
• •
Moreover, WRBUF, RDBUF, WRDMA, RDDMA commands have their 2-bit and 4-bit version. To do transactions
in 2-bit or 4-bit mode, send the original command ORed by the corresponding command mask below. For example,
command 0xA1 means WRBUF in QIO mode.
Mode Mask
1-bit 0x00
DOUT 0x10
DIO 0x50
QOUT 0x20
QIO 0xA0
QPI 0xA0
Segment Transaction Mode Segment transaction mode is the only mode supported by the SPI Slave HD driver for
now. In this mode, for a transaction the slave load onto the DMA, the master is allowed to read or write in segments.
This way the master doesn’t have to prepare large buffer as the size of data provided by the slave. After the master
finish reading/writing a buffer, it has to send corresponding termination command to the slave as a synchronization
signal. The slave driver will update new data (if exist) onto the DMA upon seeing the termination command.
The termination command is WR_DONE (0x07) for the WRDMA, and CMD8 (0x08) for the RDDMA.
Here’s an example for the flow the master read data from the slave DMA:
1. The slave loads 4092 bytes of data onto the RDDMA
2. The master do seven RDDMA transactions, each of them are 512 bytes long, and reads the first 3584 bytes
from the slave
Espressif Systems 651
Submit Document Feedback
Release v4.4