!
7.
7.1. Functional Overview
This protocol uses the ESP8266 slave mode to communicate with other processor's SPI
masters. Signal line No.6 is used to implement this protocol. Apart from signal line No.4
needed for standard SPI, signal line No.2 is also needed to inform the master of information
of the slave receive and send buffer status, so as to control the data flow.
7.2. ESP8266 SPI Slave Protocol Format
7.2.1. SPI Slave Clock Polarity Configuration
Clock polarity of the master clock which communicates with the ESP8266 SPI slave should
be set to be low in the idle state, sampling for rising edge, and changing data for falling
edge. When it reads/writes 34 Bytes at a time, selection signal CS must be kept at low
level. If CS is pulled high when data is being sent, the slave interior status will be reset.
7.2.2. Communication Format Supported by The SPI Slave
The ESP8266 SPI slave communication format is similar to that of the master, it should be
command + address+ read/write data. To be specific:
command: length, 8 bits; master output slave input (MOSI).
•
0x02 is the data sent by the master and received by the slave. The host writes 32 Bytes of
data through MOSI into SPI_W0 to SPI_W7 in the corresponding register of the slave data
buffer.
0x03 is the data received by the master and sent by the slave. 32 Bytes of data from
corresponding register of the slave buffer between SPI_W8 and SPI_W15 are sent to the
master through MISO.
⚠ Note:
other values are used to read/write the SPI slave status register SPI_STATUS. Their communication formats
are different from those of the read/write buffer, using them will cause read/write errors for the slave. So users
should not use these values.
address: length, 8 bits; master output slave input (MOSI). The address content must
•
be 0.
read/write data: length, 256 bits (32 Bytes). Master output slave input (MOSI) the
•
0x02 command, or master input slave output (MISO) the 0x03 command.
Espressif
SPI Wi-Fi Passthrough 2-
7. SPI Wi-Fi Passthrough 2-Interrupt Mode
Interrupt Mode
40 86
!
/!
2016.05
Need help?
Do you have a question about the ESP8266 and is the answer not in the manual?
Questions and answers