Skip to content

Commit f1bb57a

Browse files
author
Deepika
authored
Merge pull request ARMmbed#98 from RobMeades/master
Make the test for success when programming single blocks the same as …
2 parents 21e465b + 3e23227 commit f1bb57a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

SDBlockDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ int SDBlockDevice::program(const void *b, bd_addr_t addr, bd_size_t size)
444444
response = _write(buffer, SPI_START_BLOCK, _block_size);
445445

446446
// Only CRC and general write error are communicated via response token
447-
if ((response == SPI_DATA_CRC_ERROR) || (response == SPI_DATA_WRITE_ERROR)) {
447+
if (response != SPI_DATA_ACCEPTED) {
448448
debug_if(SD_DBG, "Single Block Write failed: 0x%x \n", response);
449449
status = SD_BLOCK_DEVICE_ERROR_WRITE;
450450
}

config/mbed_lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"SPI_CLK": "NC",
88
"DEVICE_SPI": 1,
99
"FSFAT_SDCARD_INSTALLED": 1,
10-
"CMD_TIMEOUT": 5000,
10+
"CMD_TIMEOUT": 10000,
1111
"CMD0_IDLE_STATE_RETRIES": 5,
1212
"SD_INIT_FREQUENCY": 100000
1313
},

0 commit comments

Comments
 (0)