ESP32 SPI Guide: HSPI / VSPI Default Pins, Clock Limits and Pitfalls

Which pins HSPI and VSPI default to, how fast you can realistically clock them, and why your display stays black.

How many SPIs does the ESP32 have

The original ESP32 has four SPI peripherals, but only two are yours:

Default pins

ControllerSCLKMISOMOSICS
VSPI (SPI3) — most usedGPIO18GPIO19GPIO23GPIO5
HSPI (SPI2)GPIO14GPIO12GPIO13GPIO15
HSPI's default MISO is GPIO12 — a strapping pin. It sets the internal regulator output voltage at power-up. If your slave drives that line high, the chip may never boot. When using HSPI, move MISO elsewhere or prove your circuitry does not change the level at reset.

How fast can it go

The SPI clock divides down from the APB clock (80 MHz on the ESP32), so the theoretical ceiling is 80 MHz. Reality depends on your wiring: breadboards and Dupont leads struggle past 10 MHz, a short PCB trace manages 40 MHz. Displays typically run at 20–40 MHz. Check the official documentation for exact limits.

This page describes the original ESP32. S2 / S3 / C3 / C6 / H2 / P4 use different SPI numbering and defaults — verify against the documentation for your target.

Handling chip select

Display stays black — checklist

  1. Are you on VSPI (GPIO18/23) rather than the flash pins 6–11?
  2. DC (data/command) and RST wiring — wrong here is the number one cause of a white screen.
  3. Drop the clock to 1 MHz. If it comes alive, you have a timing or wiring problem.
  4. Confirm the display is 3.3 V. A 5 V panel wired straight to the ESP32 may already have damaged the IO.
Data verified:2026-10-20 · Cross-checked against Espressif documentation. Anything that varies between chips or ESP-IDF releases is marked rather than guessed. Official peripheral docs →

Related