How does the SPI master driver work in ESP32?

How does the SPI master driver work in ESP32?

Automatic time-division multiplexing of data coming from different Devices on the same signal bus, see SPI Bus Lock. The SPI master driver has the concept of multiple Devices connected to a single bus (sharing a single ESP32 SPI peripheral). As long as each Device is accessed by only one task, the driver is thread safe.

How is a SPI bus connected to a device?

An SPI bus may be connected to one or more Devices. Each Device shares the MOSI, MISO and SCLK signals but is only active on the bus when the Host asserts the Device’s individual CS line. A signal bus, common to all Devices connected to one Host.

Is there a pinmap for the ESP32 board?

The pinmap is on the front page of the arduino-esp32 project ( https://github.com/espressif/arduino-esp32#esp32dev-board-pinmap ). You can remap SPI pins to (almost) whatever you want, but you might as well use the well tested defaults.

What is the difference between spi2 and spi3?

SPI2 and SPI3 are general purpose SPI controllers, sometimes referred to as HSPI and VSPI, respectively. They are open to users. SPI2 and SPI3 have independent bus signals with the same respective names.

What’s the difference between spi2 and spi3?

SPI2 and SPI3 have independent signal buses with the same respective names. The terms used in relation to the SPI slave driver are given in the table below. The SPI controller peripheral external to ESP32 that initiates SPI transmissions over the bus, and acts as an SPI Master. SPI slave device (general purpose SPI controller).

What does the slave driver do in ESP32?

SPI Slave driver is a program that controls ESP32’s SPI peripherals while they function as slaves. ESP32 integrates two general purpose SPI controllers which can be used as slave nodes driven by an off-chip SPI master SPI2 and SPI3 have independent signal buses with the same respective names.

Can a CS0 pin be used for a SPI slave?

Only the first Device attached to the bus can use the CS0 pin. The ESP32 SPI slave peripherals are designed as general purpose Devices controlled by a CPU. As opposed to dedicated slaves, CPU-based SPI Devices have a limited number of pre-defined registers.