2016-04-25 03:43 AM
Hallo,
I noticed a BUG insd_diskio.c
in version 1.3.0 included in STM32CubeF4 v. 1.11.0 resulting in reading/writing from wrong sectors on big capacity SD cards. In functionsSD_read
andSD_write
sector computation is casted touint64_t
too late resulting in clipping of most significant bits: Is:if(BSP_SD_ReadBlocks((uint32_t*)buff,
(uint64_t)(sector * BLOCK_SIZE), BLOCK_SIZE, count) != MSD_OK) Fix:if(BSP_SD_ReadBlocks((uint32_t*)buff,
(uint64_t) (sector) * BLOCK_SIZE, BLOCK_SIZE, count) != MSD_OK) Regards, Ra2016-04-25 03:58 AM
Hi Ra,
Thanks for highlighting this issue.It is a known issue,but the fix has not yet been released on the web. -Syrine-