Boot fail if MISO of SPI0 connected on boot

Hi, if I try to boot my ESP32 DevKitC with the MISO pin connected to that of my SPI SD card module the boot fails and the board keeps restarting. It is connected to SPI0. If I connect that pin immediately after boot everything works fine. I have a RFID reader connected to SPI1. If I swap them (SD module connected to SPI1 and RFID module to SPI0) only the first initialised of them works.

Hi @ViRiccio
I tested the SPI0 and SPI1 on my ESP32 devKitC using 8x8 LED Matrix and SD card reader, and everything is working fine, SPI0 and SPI1 could be used separately or together using threads.
So you’re behavior is strange, could you try the following steps:

  • in the device info button (on the left of the console button), click on “Erase Flash”
  • Re-register and re-virtualize the device.
  • create a new empty project and test each SPI instance separately, with no runtime errors.
    If all fail, Let me know.

I found out that the ESP32 crashes on boot if GPIO12 is HIGH, which corresponds to the MISO of SPI0. And my cheap SD module puts it HIGH as soon as it is connected…

Yes, The ESP32 has specific pin requirements during the boot to set the uC to either download mode or normal boot mode.
Check this link for more information on ESP32 boot Mode Selection.