2015-11-21 07:01 AM
Hello everybody
I have found a BUG in STM32L4 hal lib (v1.1)I don't know if it is present in other STM32 family hal library.in stm32l4xx_hal_sd.c file at 1657 linepCardInfo->CardCapacity = ((pCardInfo->SD_csd.DeviceSize + 1)) * 512 * 1024;must be change inpCardInfo->CardCapacity = ((uint64_t)((uint64_t)pCardInfo->SD_csd.DeviceSize + 1)) * 512 * 1024;this error generate false capacity detection in SDHC card and limit at 4GB some operation with FATFS library(for example wite and format) #stm32l4 #hal-library #bug2015-11-21 07:21 AM
I believe this error has been reported before, if not in the L4 specifically then for others, in fact ST has had issues with >4G SD Cards, that have been repeatedly been pointed out for the last 7-8 years.
HAL/Cube bugs/issues might be better handled in the other forum page [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/AllItems.aspx]STM32 Software Tools and Firmware2015-11-21 12:36 PM
I have now controlled stm32F4 (v1.9) hal lib and there isn't this issue.
I hope STM fix also STM32L4 lib2015-11-23 01:34 AM
Hi Cesco,
Thanks for highlighting this bug. It is reported internally to be fixed in coming releases of L4 package.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.