From f7eebee7607184fe6c4d3c81b929a7da7946b6c8 Mon Sep 17 00:00:00 2001 From: Michael McMaster Date: Tue, 22 Feb 2022 16:10:02 +1000 Subject: [PATCH] Disable direct read code over 128 sectors as it's not reliable --- src/firmware/disk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/firmware/disk.c b/src/firmware/disk.c index a9d91693..7a4cb8a7 100755 --- a/src/firmware/disk.c +++ b/src/firmware/disk.c @@ -830,7 +830,8 @@ static void diskDataIn() #ifdef STM32F4xx // Direct mode requires hardware flow control to be working on the SD peripheral - if (bytesPerSector == SD_SECTOR_SIZE) + // Code isn't currently working above 128 sectors. TODO investigate + if (totalSDSectors < 128 && bytesPerSector == SD_SECTOR_SIZE) { diskDataInDirect(totalSDSectors, sdLBA, useSlowDataCount, &phaseChangeDelayNs); } -- 2.38.5