How to connect SD Card on HSPI of ESP32-Wroom
Posted: Thu Jan 28, 2021 7:17 pm
I am trying to connect an SD card to the HSPI pins on ESP32-Wroom. I have read through the documentation but I am still fairly confused so please help me get this right for my next PCB.
So for the pins, I am going to use MOSI(GPIO13), MISO(GPIO12),CLK(GPIO14), and CS(GPIO15) which are the HSPI pins of the ESP32 Wroom. In the reference documentation (API Reference » Peripherals API » SDIO Card Slave Driver: Connections) it lists different pins (GPIO15,2,14,13 respectively). Are the pins I selected OK to use or should I be using these other pins listed in the documentation?
As for pullups I am also very confused. In the reference Documentation (API Reference » Peripherals API » SD Pull-up Requirements), it starts by saying
However, if I scroll down to "Overview of Compatibility" there is a No Pull-ups bullet point. So then I assume I dont use pull ups. IF I scroll down to the GPIO12(DAT2) Bootstrap Conflict section, it says
Scrolling further down past that, it says
So for the pins, I am going to use MOSI(GPIO13), MISO(GPIO12),CLK(GPIO14), and CS(GPIO15) which are the HSPI pins of the ESP32 Wroom. In the reference documentation (API Reference » Peripherals API » SDIO Card Slave Driver: Connections) it lists different pins (GPIO15,2,14,13 respectively). Are the pins I selected OK to use or should I be using these other pins listed in the documentation?
As for pullups I am also very confused. In the reference Documentation (API Reference » Peripherals API » SD Pull-up Requirements), it starts by saying
This implies that all the pins, aside from the SCLK will require pull up resistors.When an SD card is operating in SPI mode or 1-bit SD mode, the CMD and DATA (DAT0 - DAT3) lines of the SD bus must be pulled up by 10 kOhm resistors.
However, if I scroll down to "Overview of Compatibility" there is a No Pull-ups bullet point. So then I assume I dont use pull ups. IF I scroll down to the GPIO12(DAT2) Bootstrap Conflict section, it says
So here it says I do need a pull-up resistor.(Recommended) Burn the flash voltage selection eFuses. This will permanently configure the internal regulator’s output voltage to 3.3 V, and GPIO12 will not be used as a bootstrapping pin. After that, connect a pull-up resistor to GPIO12.
Scrolling further down past that, it says
So after all of this I am completely confused on which SPI pins I need to pull up or not. Please specify for each pin whether I need or do not need pull up resistors on my PCB to connect an SD card."No Pull-up on GPIO12: Your module is compatible with the SDIO protocol. Just connect GPIO12 to VDD via a 10 kOhm resistor."