esp-idf/components/sdmmc
Ivan Grokhotkov dceec3fac0
fix(sdmmc): use correct argument for ACMD41 in SPI mode
ACMD41 argument is different between SD mode and SPI mode.
In SPI mode, the only non-zero bit may be the HCS bit. Unlike the SD
mode, the bits reflecting the host's OCR should be zero.
Previously, we used to set these bits the same way as for the SD mode.
This has caused certain cards to fail initializing, apparently their
controllers have checked the ACMD41 argument more strictly and refused
to finish initialization, resulting in an error such as

    sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107

(Note that this error may have other causes than the one fixed in
this commit. For example, if the card doesn't have a sufficient and
stable power supply, it may also fail to complete the internal
initialization process, and will never clear the busy flag in R1
response.)

Closes https://github.com/espressif/esp-idf/issues/6686
Closes https://github.com/espressif/esp-idf/issues/10542
2024-03-01 10:50:29 +01:00
..
include docs: fix typo in header files 2021-12-14 11:01:17 +08:00
test sdspi: enable UT & ExampleTest for C3/S2 2021-09-24 15:17:18 +08:00
CMakeLists.txt Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00
component.mk remove executable permission from source files 2018-05-29 20:07:45 +08:00
sdmmc_cmd.c sdmmc: keep clock enabled for the duration of ACMD41 2023-07-18 18:17:48 +02:00
sdmmc_common.c fix(sdmmc): use correct argument for ACMD41 in SPI mode 2024-03-01 10:50:29 +01:00
sdmmc_common.h sdmmc: add communication check for eMMC after frequency switch 2019-12-12 08:11:17 +00:00
sdmmc_init.c sdmmc: add communication check for eMMC after frequency switch 2019-12-12 08:11:17 +00:00
sdmmc_io.c sdmmc: sdio combination cards correct setup 2023-04-26 13:28:20 +02:00
sdmmc_mmc.c sdmmc: add communication check for eMMC after frequency switch 2019-12-12 08:11:17 +00:00
sdmmc_sd.c Whitespace: Automated whitespace fixes (large commit) 2020-11-11 07:36:35 +00:00