Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

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 + 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy