From 28e51c9eb1f633bb4f0a17e964ef7791d54c913d Mon Sep 17 00:00:00 2001 From: Dave Hylands Date: Sat, 1 Aug 2015 15:20:25 -0700 Subject: [PATCH] stmhal: Port of f4 hal commit 09de030 to f7 hal --- stmhal/hal/f7/src/stm32f7xx_hal_sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stmhal/hal/f7/src/stm32f7xx_hal_sd.c b/stmhal/hal/f7/src/stm32f7xx_hal_sd.c index 4aa28dbfdf..d7ea7d01f5 100644 --- a/stmhal/hal/f7/src/stm32f7xx_hal_sd.c +++ b/stmhal/hal/f7/src/stm32f7xx_hal_sd.c @@ -1557,7 +1557,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