!
8.
HSPI Host Multi-device API
8.1. Functional Overview
ESP8266 encapsulates two SPI (Serial Peripheral Interfaces) bus segments, shortly named
SPI and HSPI. SPI bus is especially used to read CPU programming code from the external
Flash, while HSPI bus is used for SPI device communication.
When ESP8266 is working as a host, HSPI bus can operate with three user devices,
besides, it also supports one external Flash writing operation. User devices are supported
through selection with CS lines. To be more specific,
HSPI Default IO
SPI OVERLAP and CS1
SPI OVERLAP and CS2
SPI OVERLAP and CS0
In the above-mentioned ways of connection, SPI bus shares the same external Flash with
HSPI bus. Apart from the memory occupied by programs and related configurations, the
rest Flash memory can all be used for reading and writing of user programs.
⚠ Notice:
Operation with devices via HSPI host implemented by software programming is not supported in the
•
API functions.
When downloading user programs, the clock frequency of SPI bus used for reading Flash data should
•
be set at 80 MHz. SPI clock frequency should be specified as 80 MHz at SPI OVERLAP and CS1
mode or SPI OVERLAP and CS2 mode.
8.2. Hardware Connection
Generally speaking, SPI slave devices specify four logic signals: SCLK, MOSI, MISO, and
CS.
HSPI bus can operate with three different user devices, the ways of connection are
explained below:
HSPI Default IO
Espressif
Mode
Mode
Pin Name of Host ESP8266
MTDO
MTCK
MTDI
User device 1
User device 2
User device 3
Flash
46 86
!
/!
8. HSPI Host Multi-device API
Device Name
SPI bus Signal Line
CS
MOSI
MISO
2016.05
Need help?
Do you have a question about the ESP8266 and is the answer not in the manual?
Questions and answers