Parcourir la source

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

Michael McMaster il y a 3 ans
Parent
commit
6ccf74eec0
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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);
     }