AnsweredAssumed Answered

STM32Cube SDHC capacity bug (solved)

Question asked by dahim.yael on May 11, 2014
Latest reply on Jul 23, 2014 by Montassar BEN ROMDHANE
Hello, in stm32f4xx_hal_sd.c line 1554 :
pCardInfo->CardCapacity  = ((pCardInfo->SD_csd.DeviceSize + 1)) * 512 * 1024;
should be :
pCardInfo->CardCapacity  = (uint64_t) ((pCardInfo->SD_csd.DeviceSize + 1)) * 512 * 1024;
or pCardInfo->CardCapacity (which is uint64_t) is blocked at uint32_t maximum.

Outcomes