Skip to content
esp-labsESP32-S3 bench guide
All blocks

Connectivity

SPI

Fast four-wire bus for screens, card readers and flash

runs on the board

Loading the 3D view…

  • SCK
  • MOSI
  • MISO
  • CS

Key facts

In our labs

29 labs use this block, across 5 tracks. Open a track to see them.

  • done by you
  • runs on the board
  • built, not flashed
  • planned

Key registers

SPI_CMD_REGoffset 0x0000
SPI_CMD_REG
BitsFieldWhat it does
24SPI_USRStart a transfer; clears itself when done.
23SPI_UPDATECopy the new settings into the SPI clock domain.

Technical reference §30.12

SPI_CLOCK_REGoffset 0x000C
SPI_CLOCK_REG
BitsFieldWhat it does
31SPI_CLK_EQU_SYSCLK1: SPI clock = APB clock (80 MHz).
21:18SPI_CLKDIV_PREPre-divider.
17:12SPI_CLKCNT_NDivider: f = APB / (PRE+1) / (N+1).

Technical reference §30.12

SPI_MS_DLEN_REGoffset 0x001C
SPI_MS_DLEN_REG
BitsFieldWhat it does
17:0SPI_MS_DATA_BITLENData length of the transfer, in bits, minus 1.

Technical reference §30.12

SPI_MISC_REGoffset 0x0020
SPI_MISC_REG
BitsFieldWhat it does
29SPI_CK_IDLE_EDGEClock level when idle (the polarity, CPOL).
0SPI_CS0_DIS1 disables the CS0 pin.

Technical reference §30.12

SPI_W0_REGoffset 0x0098
SPI_W0_REG
BitsFieldWhat it does
31:0SPI_BUF0First of 16 data buffers (SPI_W0 to W15, 64 bytes) for CPU-driven transfers.

Technical reference §30.12

Read the full sectionTechnical reference §30