Skip to content

Commit cb22538

Browse files
committed
drivers/sdmmc: fix response type for CMD3
SD Card responses on CMD3 with R6 instead of R3 to publish its RCA. Bug found when migrating SDMMC for ESP32x to ESP-IDF v5.4.
1 parent a8b1ae3 commit cb22538

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/sdmmc/sdmmc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,8 @@ int sdmmc_card_init(sdmmc_dev_t *dev)
538538
}
539539
else {
540540
DEBUG("[sdmmc] send CMD3 to get RCA\n");
541-
/* for SD cards, the card selects RCA and sends it back in R3 */
542-
res = _send_cmd(dev, SDMMC_CMD3, SDMMC_CMD_NO_ARG, SDMMC_R3, response);
541+
/* for SD cards, the card selects RCA and sends it back in R6 */
542+
res = _send_cmd(dev, SDMMC_CMD3, SDMMC_CMD_NO_ARG, SDMMC_R6, response);
543543
dev->rca = response[0] >> 16;
544544
}
545545
if (res) {

0 commit comments

Comments
 (0)