From a7f23635a40951fd968115d94ed3e51250604c1c Mon Sep 17 00:00:00 2001 From: Deepika Date: Tue, 27 Jun 2017 14:00:44 -0500 Subject: [PATCH] Added pre-erase command to boost multiple write block performance --- features/filesystem/sd/SDBlockDevice.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/features/filesystem/sd/SDBlockDevice.cpp b/features/filesystem/sd/SDBlockDevice.cpp index 34bf08f0e1..a162875ee1 100644 --- a/features/filesystem/sd/SDBlockDevice.cpp +++ b/features/filesystem/sd/SDBlockDevice.cpp @@ -410,6 +410,8 @@ int SDBlockDevice::program(const void *b, bd_addr_t addr, bd_size_t size) */ status = _cmd(CMD13_SEND_STATUS, 0); } else { + // Pre-erase setting prior to multiple block write operation + _cmd(ACMD23_SET_WR_BLK_ERASE_COUNT, blockCnt, 1); // Multiple block write command if (BD_ERROR_OK != (status = _cmd(CMD25_WRITE_MULTIPLE_BLOCK, addr))) { _lock.unlock();