Communication Format Supported By Slave Spi; Command Definition Supported By Slave Spi; Slave Spi Communication Format Supported By Current Api; Api Function Description Of Spi Module - Espressif ESP8266 Technical Reference

Hide thumbs Also See for ESP8266:
Table of Contents

Advertisement

!

4.3.2. Communication Format Supported by Slave SPI

Slave ESP8266SPI communication format is almost the same as that of the master mode,
i.e. command+address+read/write data, but the slave read/write operation has its
hardware command and undeletable address, which is,
Command: a must; length: 3 ~ 16 bits; master output and slave input (MOSI).
Address: a must; length: 1 ~ 32 bits master output and slave input (MOSI).
Read/write data: optional; length: 0 ~ 512 bits (64 Bytes); master output and slave
input (MOSI) or master input and slave output (MISO).
4.3.3. Command Definition Supported by Slave SPI
The length of slave receiving command should at least be 3 bits. For low 3 bits, there are
hardware reading and writing operation, which is,
010 (slave receiving) : Write the data sent by master into the register of slave data
caching via MOSI, i.e. SPI_FLASH_C0 to SPI_FLASH_C15.
011 (slave sending): Send the data in the register of slave data caching (from
SPI_FLASH_C0 to SPI_FLASH_C15) to master via MOSI.
110 (slave receiving and sending): Send slave data caching to MISO and write the
master data in MOSI into data caching SPI_FLASH_C0 to SPI_FLASH_C15.
⚠ Notice:
Other vales are used to read and write the status register of slave SPI, SPI_FLASH_STATUS. Please do not
use it because the difference between communication format and data caching reading/writing might lead to
slave read/write error.

4.3.4. Slave SPI Communication Format Supported by Current API

The API function of ESP8266 SPI has a slave initialization mode which is compatible with
most of the devices in bytes. Set the slave communication format of 7 bits command+8
bits read/write data so that other master SPI devices could read and write bytes of slave
SPI via the 16 bits communication (or two times 8 bits with low lever CS). Please refer to
Section 4.4.2 for detailed information.

4.4. API Function Description of SPI Module

4.4.1. API Function Description of Master SPI

1. void spi_lcd_mode_init(uint8 spi_no)
Function:
Provide master SPI initialization program for driving the chromatic LCD TM035PDZV36.
Parameters:
Espressif
22 86
!
/!
4. SPI Communication User Guide
2016.05

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP8266 and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF