mmcsd: add nxsig_usleep delay after MMC_CMD1 command

MMC_CMD1 command is used to check whether card is MMC type (checked if
CONFIG_MMCSD_MMCSUPPORT is enabled). This commit inserts nxsig_usleep
wait if this check fails. This is to ensure the communication recovers
from invalid response as this may take some time on some platforms (
samv7 for example). Following command for SDHC check may fail if sleep
is not used.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
Michal Lenc
2023-03-13 11:10:09 +01:00
committed by Petro Karashchenko
parent 061e98aa98
commit 0797b03c08
+6
View File
@@ -3377,6 +3377,12 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
if (ret != OK)
{
ferr("ERROR: CMD1 RECVR3: %d\n", ret);
/* CMD1 did not succeed, card is not MMC. This sleep let
* the communication to recover before another send.
*/
nxsig_usleep(MMCSD_IDLE_DELAY);
}
else
{