Skip to content

Commit d2e12bd

Browse files
author
unknown
committed
Fixbug: Fix the bug where the cmd6 command is sent but the status of the card is not queried, which can cause failure in switching to the high-speed mode in DDR mode.
1 parent fa1e5b0 commit d2e12bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/drivers/sdio/dev_mmc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ static int mmc_poll_for_busy(struct rt_mmcsd_card *card, rt_uint32_t timeout_ms,
323323
return err;
324324
}
325325
}
326-
while (!(status & R1_READY_FOR_DATA));
326+
while (!(status & R1_READY_FOR_DATA) ||
327+
(R1_CURRENT_STATE(status) == R1_STATE_PRG));
327328

328329
return err;
329330
}

0 commit comments

Comments
 (0)