diff --git a/src/main/drivers/sdcard/sdmmc_sdio_f4xx.c b/src/main/drivers/sdcard/sdmmc_sdio_f4xx.c index 8999cdd7197..c0076a5682d 100644 --- a/src/main/drivers/sdcard/sdmmc_sdio_f4xx.c +++ b/src/main/drivers/sdcard/sdmmc_sdio_f4xx.c @@ -772,7 +772,7 @@ SD_Error_t SD_GetCardInfo(void) SD_CardInfo.CardCapacity = (SD_CardInfo.SD_csd.DeviceSize + 1) ; SD_CardInfo.CardCapacity *= (1 << (SD_CardInfo.SD_csd.DeviceSizeMul + 2)); SD_CardInfo.CardBlockSize = 1 << (SD_CardInfo.SD_csd.RdBlockLen); - SD_CardInfo.CardCapacity *= SD_CardInfo.CardBlockSize; + SD_CardInfo.CardCapacity = SD_CardInfo.CardCapacity * SD_CardInfo.CardBlockSize / 512; // In 512 byte blocks } else if (SD_CardType == SD_HIGH_CAPACITY) { // Byte 7