8000 stmhal/hal/src/stm32f4xx_hal_sd.c: fix SDHC card capacity · tuxlinuxien/micropython@09de030 · GitHub
[go: up one dir, main page]

Skip to content

Commit 09de030

Browse files
tmbincdpgeorge
authored andcommitted
stmhal/hal/src/stm32f4xx_hal_sd.c: fix SDHC card capacity
1 parent d4a799f commit 09de030

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stmhal/hal/src/stm32f4xx_hal_sd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ HAL_SD_ErrorTypedef HAL_SD_Get_CardInfo(SD_HandleTypeDef *hsd, HAL_SD_CardInfoTy
15781578
/* Byte 10 */
15791579
tmp = (uint8_t)((hsd->CSD[2] & 0x0000FF00) >> 8);
15801580

1581-
pCardInfo->CardCapacity = ((pCardInfo->SD_csd.DeviceSize + 4FF1 1)) * 512 * 1024;
1581+
pCardInfo->CardCapacity = ((pCardInfo->SD_csd.DeviceSize + 1ULL)) * 512 * 1024;
15821582
pCardInfo->CardBlockSize = 512;
15831583
}
15841584
else

0 commit comments

Comments
 (0)
0