2014-05-11 08:21 AM
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.2014-05-11 10:30 AM
2014-05-23 06:17 AM
Hi,
You're right, although CardCapacity is a uint64_t, the math on the right side is all done in 32-bit land and thus all capacity bits above 4GB will be lost. The issue is confirmed and will be fixed in the next release of STM32Cube_FW_F4.With regards.2014-06-12 09:13 PM
Hi all
This capacity bug also extends to the ''STORAGE_GetCapacity_xx()'' functions where it enters with a pointer to a uint32_t value instead of uint64_t.This needs to be changed in a few locations within the HAL source code so that any card > 4GB will be shown (formatted) correctly in windows.2014-07-23 06:03 AM
Hi JasonP,
Thanks for the feedback. We’ve noted this as a problem. In the meantime, please continue to report bugs and submit valuable feedback.With regards.