Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP-IDF SD Card example not working #29

Closed
xvinny-zz opened this issue Mar 16, 2018 · 1 comment
Closed

ESP-IDF SD Card example not working #29

xvinny-zz opened this issue Mar 16, 2018 · 1 comment

Comments

@xvinny-zz
Copy link

Hi,

I tried to test the SD card example but it isn't working.
Follow my log:

�[0;32mI (189) boot: Loaded app from partition at offset 0x10000�[0m
�[0;32mI (189) boot: Disabling RNG early entropy source...�[0m
�[0;32mI (194) cpu_start: Pro cpu up.�[0m
�[0;32mI (197) cpu_start: Starting app cpu, entry point is 0x40080e44�[0m
�[0;32mI (0) cpu_start: App cpu up.�[0m
�[0;32mI (208) heap_init: Initializing. RAM available for dynamic allocation:�[0m
�[0;32mI (215) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM�[0m
�[0;32mI (221) heap_init: At 3FFB69D8 len 00029628 (165 KiB): DRAM�[0m
�[0;32mI (227) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM�[0m
�[0;32mI (233) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM�[0m
�[0;32mI (240) heap_init: At 400892FC len 00016D04 (91 KiB): IRAM�[0m
�[0;32mI (246) cpu_start: Pro cpu start user code�[0m
�[0;32mI (264) cpu_start: Starting scheduler on PRO CPU.�[0m
�[0;32mI (0) cpu_start: Starting scheduler on APP CPU.�[0m
�[0;32mI (266) example: Initializing SD card�[0m
�[0;32mI (266) example: Using SPI peripheral�[0m
�[0;32mI (266) gpio: GPIO[5]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 �[0m
�[0;31mE (326) sdspi_host: data CRC failed, got=0x5be3 expected=0xfc40�[0m
�[0;32mI (326) sdspi_host: 00 10 80 00 00 00 00 00 35 79 fb 3f 00 a7 fb 3f �[0m
�[0;31mE (326) sdspi_host: sdspi_host_start_command: cmd=51 error=0x109�[0m
�[0;31mE (336) sdmmc_cmd: sdmmc_card_init: send_scr (2) returned 0x109�[0m
�[0;31mE (346) example: Failed to initialize the card (265). Make sure SD card lines have pull-up resistors in place.�[0m

The detail is.. the Arduino example works!!
What am I doing wrong?

Best regards,

Vinicius

@xvinny-zz
Copy link
Author

I figured out. According to the issue #965 in github.com/espressif/esp-idf (espressif/esp-idf#965), you must add host.max_freq_khz = SDMMC_FREQ_PROBING; line to SDMMC host initialization.
I tried to pull this change to the example here but couldn't. Please do it as soon as possible to to prevent others from going through this same situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant