Merge pull request #1340 from fritzbauer/SDCardInitFix

Do not call spisdcard_select for CMD0.
This commit is contained in:
enjoy-digital 2022-07-05 11:27:23 +02:00 committed by GitHub
commit 9f2b62d6e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;