SD card driving with SPI

m3ayko83
Posts: 4
Joined: Sun Nov 25, 2018 1:43 pm

SD card driving with SPI

Postby m3ayko83 » Sat Jan 26, 2019 9:50 am

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
Attachments
sd_schematic.PNG
sd_schematic.PNG (119.32 KiB) Viewed 7517 times

m3ayko83
Posts: 4
Joined: Sun Nov 25, 2018 1:43 pm

Re: SD card driving with SPI

Postby m3ayko83 » Sun Mar 10, 2019 7:42 pm

no one can helf please :D

ESP_Stone
Posts: 19
Joined: Mon Nov 19, 2018 3:59 am

Re: SD card driving with SPI

Postby ESP_Stone » Mon Mar 11, 2019 2:11 am

Sorry, but what does SCL mean?

ESP_michael
Posts: 37
Joined: Mon Aug 28, 2017 10:25 am

Re: SD card driving with SPI

Postby ESP_michael » Mon Mar 11, 2019 3:31 am

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?

m3ayko83
Posts: 4
Joined: Sun Nov 25, 2018 1:43 pm

Re: SD card driving with SPI

Postby m3ayko83 » Mon Mar 11, 2019 9:30 am

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 7399 times

Who is online

Users browsing this forum: Bing [Bot] and 86 guests