Skip to content

Commit

Permalink
Workaround for SD Card Initialization bug on Pi 4 (#253)
Browse files Browse the repository at this point in the history
Change-Id: I801fe7706795a71b08a9ec80534ca21745124d13
  • Loading branch information
hoglet67 committed Dec 4, 2021
1 parent cab728b commit d879a81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/fatfs/sdcard.c
Expand Up @@ -1729,7 +1729,11 @@ int sd_card_init(struct block_device **dev)
printf("SD: error sending SEND_SCR\r\n");
free(ret->scr);
if (!dev) free(ret);
return -1;
printf("******************************************\r\n");
printf("* Reinitializing SD Card Driver *\r\n");
printf("******************************************\r\n");
sd_power_off();
return sd_card_init((struct block_device **)&ret);
}

// Determine card version
Expand Down

0 comments on commit d879a81

Please sign in to comment.