Prechádzať zdrojové kódy

Merge pull request #253 from ZuluSCSI/dev_rp2040_sdio_timeout

RP2040 SDIO: Increase stopTransmission timeout.
Alex Perez 2 rokov pred
rodič
commit
182c68f812

+ 3 - 1
lib/ZuluSCSI_platform_RP2040/sd_card_sdio.cpp

@@ -263,7 +263,7 @@ bool SdioCard::stopTransmission(bool blocking)
     }
     else
     {
-        uint32_t end = millis() + 100;
+        uint32_t end = millis() + 5000;
         while (millis() < end && isBusy())
         {
             if (m_stream_callback)
@@ -421,6 +421,8 @@ bool SdioCard::writeSectors(uint32_t sector, const uint8_t* src, size_t n)
     }
     else
     {
+        // TODO: Instead of CMD12 stopTransmission command, according to SD spec we should send stopTran token.
+        // stopTransmission seems to work in practice.
         return stopTransmission(true);
     }
 }