diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-04-24 11:21:23 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-04-24 11:21:23 +0000 |
commit | af639f7aa4633d0604bc58e2f925c732cf768945 (patch) | |
tree | 51eba8522a124ca1048b060adc5f83f370940ce2 | |
parent | 48ce328ea465ca2c1eb04c58609cfdbd4459d83d (diff) | |
download | ChibiOS-af639f7aa4633d0604bc58e2f925c732cf768945.tar.gz ChibiOS-af639f7aa4633d0604bc58e2f925c732cf768945.tar.bz2 ChibiOS-af639f7aa4633d0604bc58e2f925c732cf768945.zip |
Fixed bug 2991714.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1886 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/src/mmc_spi.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/os/hal/src/mmc_spi.c b/os/hal/src/mmc_spi.c index 6fb7a8332..fd63d7838 100644 --- a/os/hal/src/mmc_spi.c +++ b/os/hal/src/mmc_spi.c @@ -460,7 +460,10 @@ bool_t mmcStopSequentialRead(MMCDriver *mmcp) { chSysUnlock();
spiSend(mmcp->mmc_spip, sizeof(stopcmd), stopcmd);
- result = recvr1(mmcp) != 0x00;
+/* result = recvr1(mmcp) != 0x00;*/
+ /* Note, ignored r1 response, it can be not zero, unknown issue.*/
+ recvr1(mmcp);
+ result = FALSE;
spiUnselect(mmcp->mmc_spip);
chSysLock();
@@ -530,8 +533,10 @@ bool_t mmcSequentialWrite(MMCDriver *mmcp, const uint8_t *buffer) { spiSend(mmcp->mmc_spip, MMC_SECTOR_SIZE, buffer); /* Data. */
spiIgnore(mmcp->mmc_spip, 2); /* CRC ignored. */
spiReceive(mmcp->mmc_spip, 1, b);
- if ((b[0] & 0x1F) == 0x05)
+ if ((b[0] & 0x1F) == 0x05) {
+ wait(mmcp);
return FALSE;
+ }
/* Error.*/
spiUnselect(mmcp->mmc_spip);
|