Skip to content

Commit 80d278d

Browse files
committed
fixed an issue where single block reads on stm32f4 were overflowing on data reads past the 4GB point on SDHC cards, this broke video playback on large AVIs amongst other issues
1 parent eb9a2e8 commit 80d278d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

libs/filesystem/fat_sd/sdio_diskio.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ BUFFER WE F_READ INTO SHOULD BE 4 BYTES LONGER THAN THE MAX READ REQUEST
115115
return disk_read_unaligned(drv, buff, sector, count);
116116
#endif
117117
if (count<=1)
118+
#ifdef STM32F4
119+
SD_ReadMultiBlocksFIXED(buff, sector, SECTOR_SIZE, 1);
120+
#else
118121
SD_ReadBlock(Memory_Offset, (uint32_t *)buff, Transfer_Length);
122+
#endif
119123
else
120124
#ifdef STM32F4
121125
SD_ReadMultiBlocksFIXED(buff, sector, SECTOR_SIZE, count);

0 commit comments

Comments
 (0)