Jelajahi Sumber

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

Michael McMaster 3 tahun lalu
induk
melakukan
6ccf74eec0
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  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);
     }