diff options
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525v2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index 1a555e745d..a668f65e0c 100644 --- a/firmware/target/arm/as3525/sd-as3525v2.c +++ b/firmware/target/arm/as3525/sd-as3525v2.c @@ -878,6 +878,12 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start, last_disk_activity = current_tick; + if(write) + { + /* wait for the card to exit programming state */ + while(MCI_STATUS & DATA_BUSY) ; + } + if(!send_cmd(drive, SD_STOP_TRANSMISSION, 0, MCI_NO_RESP, NULL)) { ret = -666; |