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

sdmmc_card_init: send_scr returned 0x109 #227

Closed
mtmsweb opened this Issue Jan 13, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@mtmsweb

mtmsweb commented Jan 13, 2017

I test esp on self-made PCB, some connection problems are possible.
Only tested card, that I have now, is 2GB SanDisk (China):

sdmmc_card_init results in

sdmmc_cmd: sdmmc_card_init: send_scr returned 0x109�

csd and cid read correctly:

sd_card: csd_ver : 0
sd_card: mmc_ver : 0
sd_card: capacity : 3970048
sd_card: sector_size : 512
sd_card: mfg_id : 3
sd_card: oem_id : 21316
sd_card: name : SD02G

@igrr

This comment has been minimized.

Show comment
Hide comment
@igrr

igrr Jan 13, 2017

Member

0x109 is ESP_ERR_INVALID_CRC, and send_scr is the first transaction which uses D0 line (all the previous ones use only CMD and CLK). Suggest checking what happens on D0 line (that's GPIO2) using an oscilloscope. You may be missing a pull up resistor on this line, or you may have both a pull down resistor and a pull up one.

Note that flashing the ESP with a pull up resistor attached to GPIO2 will not work, because GPIO2 needs to be low when going into the bootloader mode. One solution is to connect GPIO2 and GPIO0 with a jumper — this will pull down GPIO2 along with GPIO0 during programming.

Member

igrr commented Jan 13, 2017

0x109 is ESP_ERR_INVALID_CRC, and send_scr is the first transaction which uses D0 line (all the previous ones use only CMD and CLK). Suggest checking what happens on D0 line (that's GPIO2) using an oscilloscope. You may be missing a pull up resistor on this line, or you may have both a pull down resistor and a pull up one.

Note that flashing the ESP with a pull up resistor attached to GPIO2 will not work, because GPIO2 needs to be low when going into the bootloader mode. One solution is to connect GPIO2 and GPIO0 with a jumper — this will pull down GPIO2 along with GPIO0 during programming.

@igrr igrr closed this Jan 13, 2017

@igrr igrr removed the in progress label Jan 20, 2017

@igrr igrr modified the milestone: v2.0 Jan 20, 2017

@vinifr

This comment has been minimized.

Show comment
Hide comment
@vinifr

vinifr Jul 20, 2018

Sorry for post here, I have same problem, but i am getting a different value. I am getting this:
gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
sdmmc_cmd: sdmmc_card_init: send_scr (2) returned 0xffffffff

Could be the same problem? My GPIO2 is always high level.

vinifr commented Jul 20, 2018

Sorry for post here, I have same problem, but i am getting a different value. I am getting this:
gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
sdmmc_cmd: sdmmc_card_init: send_scr (2) returned 0xffffffff

Could be the same problem? My GPIO2 is always high level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment