What is the SPI pinout of the ESP32 / ESP-WROOM-32?

When using the ESP32 as SPI master, you can use any pinsfor the SCLKMISOMOSI and CS signals, but using the following set of pins has minor advantages:

[table id=5 /]

If you use all of the pins for SPI2or all of the pins for SPI3, using those pins is slightly faster, since the signals do not have to be routed through the GPIO matrix. This has the advantage of having a lower input delay (which is important at high speeds to avoid issues with MISO setup time) and that you can operate the SPI bus at 80 MHz (as opposed to 40 MHz with the GPIO matrix).

If you use ANY pin beside those listed above, ALL pins will be routed through the GPIO matrix - so use either all of these pins or ignore it altogether. Note that some pins are input-only or reserved for special functions, so they may not be used for some or all of the SPI signals. Source & further reading:ESP32 SPI master driver documentation