Problems with SD card slot, Wifi is connecting every second time #200
-
Hello guys, last weekend I got a ESP32 Audio Kit V2.2 2957. It is my first ESP32 board :). I tested your library and it is working fine, good job 👍 ! Unfortunately I have problems with other parts of the board. Here are my impressions:
Here is the specification of the board: Click #define SD_CS GPIO_NUM_13 //SD_DATA3 My switch configuration on the board is: I tried different approaches to solve the problem, but I couldn't get it work, for example: `SPIClass spiSD(HSPI); pinMode(SD_CS, OUTPUT); spiSD.begin(SPI_SCK, SPI_MISO, SPI_MOSI); if (!SD.begin(SD_CS, spiSD)) { I tried it without the pinMode and digitalWrite functions too, but SD.begin is still not working. Do you have any ideas, what is wrong here? PS.: My SD card is a SDHC class 6 with 16 GB from Watson. I format it with FAT32. Thanks for your effort. Best regards |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Tipp: it's not necessary to restart the ESP. Resetting WiFi.begin() ist sufficient: For SD I'd recommend to use SD_MMC instead of SPI. Needs a pin less and is round about twice as fast. |
Beta Was this translation helpful? Give feedback.
-
Have a look at this one: You only need GPIOs 15, 14 and 2. This is sd_mmc in 1bit-mode. But's that's already connected accordingly at your board. So you don't have to care about hardware. But in software basically this line is important: https://github.com/espressif/arduino-esp32/blob/master/libraries/SD_MMC/examples/SDMMC_Test/SDMMC_Test.ino#L175 |
Beta Was this translation helpful? Give feedback.
-
Hello egezgin, |
Beta Was this translation helpful? Give feedback.
Have a look at this one:
https://github.com/espressif/arduino-esp32/blob/master/libraries/SD_MMC/examples/SDMMC_Test/SDMMC_Test.ino
You only need GPIOs 15, 14 and 2. This is sd_mmc in 1bit-mode. But's that's already connected accordingly at your board. So you don't have to care about hardware.
But in software basically this line is important: https://github.com/espressif/arduino-esp32/blob/master/libraries/SD_MMC/examples/SDMMC_Test/SDMMC_Test.ino#L175