Skip to content

Commit

Permalink
Merge pull request ARMmbed#49 from LemonBoy/erase_size
Browse files Browse the repository at this point in the history
Correct calculation of the erase sector size
  • Loading branch information
Deepika authored Aug 17, 2017
2 parents c7347c9 + 705462d commit 0ac12a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SDBlockDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ uint32_t SDBlockDevice::_sd_sectors() {
_erase_size = BLOCK_SIZE_HC;
} else {
// ERASE_BLK_EN = 1: Erase in multiple of SECTOR_SIZE supported
_erase_size = ext_bits(csd, 45, 39);
_erase_size = BLOCK_SIZE_HC * (ext_bits(csd, 45, 39) + 1);
}
break;

Expand Down

0 comments on commit 0ac12a0

Please sign in to comment.