summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index 65308089b7..836981f321 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -963,6 +963,11 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
dma_release();
+ /* CMD lines are separate, not common, so we need to actively deselect */
+ /* CMD7 w/rca =0 : deselects card & puts it in STBY state */
+ if(!send_cmd(drive, SD_DESELECT_CARD, 0, MCI_NO_RESP, NULL))
+ return -21;
+
#ifndef BOOTLOADER
sd_enable(false);
led(false);