pycom / pycom-esp-idf

A fork of the Espressif IDF
Apache License 2.0
54 stars 62 forks source link

Failed to initialize the card #39

Open rjrajbir opened 2 years ago

rjrajbir commented 2 years ago

Hello there

I am first time working on an SD card with ESP-IDF

I am using ESP32 Devkit_v1 and an SD card module

I have tried SD Arduino lib and it worked.

Now for ESP_IDF i am using esp-idf/examples/storage/sd_card/sdspi/main/sd_card_example_main.c

I am using SPI MODE here

But I got this error

I (294) cpu_start: Pro cpu start user code
I (312) spi_flash: detected chip: generic
I (312) spi_flash: flash io: dio
I (313) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (321) example: Initializing SD card
I (321) example: Using SPI peripheral
I (331) gpio: GPIO[5]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (341) sdspi_transaction: cmd=52, R1 response: command not supported
I (391) sdspi_transaction: cmd=5, R1 response: command not supported
E (421) sdmmc_sd: sdmmc_check_scr: send_scr returned 0x109
E (421) vfs_fat_sdmmc: sdmmc_card_init failed (0x109).
I (421) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
E (431) example: Failed to initialize the card (ESP_ERR_INVALID_CRC). Make sure SD card lines have pull-up resistors in place.

Thank you in advance.