Espressif Systems ESP Faq page 95

Table of Contents

Advertisement

Chapter 4. Software framework
What is the difference among SPI0, SPI1, HSPI and VSPI in ESP32?
• ESP32 has 4 SPIs, SPI0 and SPI1 are two peripherals, also known as MSPI. SPI0 and SPI1 share the same
SPI bus (same signals and IOs). The difference is, MSPI CS0 is connected to the main flash for firmware
storage, and MSPI CS1 is connected to PSRAM. SPI2 and SPI3 are general-purpose SPIs that are available
for customers to use.
• HSPI represents the above-mentioned SPI2, and VSPI represents the SPI3. The two sets of SPIs are general-
purpose SPIs and support QSPI.
The maximum data transmission of ESP32 SPI DMA is 4095 bytes. Is it because of hardware limitation?
• Yes, this is a hardware limitation.
• A single node in the DMA table can only mount 4095 bytes of data, but it is possible to send more data through
several nodes.
• The maximum number of bytes that the SPI can send through the DMA table is also limited by the hardware
register SPI_LL_DATA_MAX_BIT_LEN (the value varies by chip family and can be obtained in the ESP-IDF),
i.e. max_transfer_sz <= (SPI_LL_DATA_MAX_BIT_LEN >> 3).
The SPI of ESP32-S2 accesses three SPI Slave devices at the same time, do I need to synchronize the
semaphore to access it?
• The same SPI peripheral, as the master, can only communicate with one slave at a time, and CS decides which
slave to communicate with. If you connect 3 slave devices to the SPI driver and communicate with them
separately, it is okay and recommended.
• It is recommended to share one SPI device in one task. Otherwise, the threads are not safe, and they commu-
nicate through semaphore synchronization. For details, please refer to
When using an ESP32 board for development and testing based on ESP-IDF release/v4.3, I received the
following error log during compilation. What is the reason?
spi_flash:Detected size(8192K) smaller than the size in the binary
header(16384K).Probe failed.
The reason is that the configured flash size is larger than the actual flash size. In order to avoid misuse
of a larger address space, the actual flash size is checked.
What is the maximum transmission speed supported by SPI slave?
CHIP: ESP32
ESP32 can support up to 10 M of transmission speed when serves as an SPI slave.
Espressif Systems
78
Submit Document Feedback
SPI Master
driver-feature.
image␣
Release master

Advertisement

Table of Contents
loading
Need help?

Need help?

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

This manual is also suitable for:

Esp32Esp8266Esp32-s2Esp32-c3Esp32-s3

Table of Contents