diff --git a/sdcard.c b/sdcard.c index d76f797..9f6590d 100644 --- a/sdcard.c +++ b/sdcard.c @@ -186,7 +186,12 @@ // CMD0 - go to idle state response[0] = sendIdle(); - if (response[0] > 0x01) { + if (response[0] != 0x01) { + // retry solves failure possibly caused by another component + // on the same SPI bus + response[0] = sendIdle(); + } + if (response[0] != 0x01) { printString("SD card error 0\r\n"); return false; }