From fa234e8ed80049fde5d722c473d73ad24ce0b65c Mon Sep 17 00:00:00 2001 From: Rouven Broszeit Date: Thu, 23 Jun 2022 16:17:05 +0200 Subject: [PATCH] Do not call spisdcard_select for CMD0. --- litex/soc/software/liblitesdcard/spisdcard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litex/soc/software/liblitesdcard/spisdcard.c b/litex/soc/software/liblitesdcard/spisdcard.c index 99bf4246c..a58a6c3bb 100644 --- a/litex/soc/software/liblitesdcard/spisdcard.c +++ b/litex/soc/software/liblitesdcard/spisdcard.c @@ -173,7 +173,7 @@ static uint8_t spisdcardsend_cmd(uint8_t cmd, uint32_t arg) } /* Select the card and wait for it, except for CMD12: STOP_TRANSMISSION */ - if (cmd != CMD12) { + if (cmd != CMD12 && cmd != CMD0) { spisdcard_deselect(); if (spisdcard_select() == 0) return 0xff;