stmhal/hal/src/stm32f4xx_hal_sd.c: fix SDHC card capacity

This commit is contained in:
Felix Domke 2014-09-05 13:47:33 +02:00 committed by Damien George
parent d4a799f152
commit 09de030651

View File

@ -1578,7 +1578,7 @@ HAL_SD_ErrorTypedef HAL_SD_Get_CardInfo(SD_HandleTypeDef *hsd, HAL_SD_CardInfoTy
/* Byte 10 */
tmp = (uint8_t)((hsd->CSD[2] & 0x0000FF00) >> 8);
pCardInfo->CardCapacity = ((pCardInfo->SD_csd.DeviceSize + 1)) * 512 * 1024;
pCardInfo->CardCapacity = ((pCardInfo->SD_csd.DeviceSize + 1ULL)) * 512 * 1024;
pCardInfo->CardBlockSize = 512;
}
else