Page 1 of 1

SD card driving with SPI

Posted: Sat Jan 26, 2019 9:50 am
by m3ayko83
i try to make the demo code for SD card work but i get the error
Failed to initialize the card (ESP_ERR_INVALID_STATE). Make sure SD card lines have pull-up resistors in place. attached is my schematic for the SD card,

I (1246) SD_CARD_TASK: Initializing SD card
I (1246) SD_CARD_TASK: Using SPI peripheral
I (1250) gpio: GPIO[22]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1281) gpio: GPIO[23]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1281) gpio: GPIO[19]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1289) gpio: GPIO[18]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0

Re: SD card driving with SPI

Posted: Sun Mar 10, 2019 7:42 pm
by m3ayko83
no one can helf please :D

Re: SD card driving with SPI

Posted: Mon Mar 11, 2019 2:11 am
by ESP_Stone
Sorry, but what does SCL mean?

Re: SD card driving with SPI

Posted: Mon Mar 11, 2019 3:31 am
by ESP_michael
Hi m3ayko83,

We can't tell exactly what's the problem from the information you given. Personally I guess it's a driver initialization issue.
Can you provide your code and the complete log for us to help you?

Re: SD card driving with SPI

Posted: Mon Mar 11, 2019 9:30 am
by m3ayko83
i'am using the sd card example code from the IDF and i get this error after init, it seems that the GPIO not correctly configured.
log.PNG
log.PNG (26.17 KiB) Viewed 7134 times