浏览代码

Disable direct read code over 128 sectors as it's not reliable

Michael McMaster 3 年之前
父节点
当前提交
6ccf74eec0
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lib/SCSI2SD/src/firmware/disk.c

+ 2 - 1
lib/SCSI2SD/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);
     }