Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #6686 Closes #10542
- Loading branch information