drivers/sdcard: Add sleep_ms(1) delay in SDCard.readinto sync loop.
So this driver works on faster MCUs (that run this loop fast) with older, slower SD cards. Fixes issue #7129. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
bb2007b05c
commit
a1bc32d8a8
@ -176,6 +176,7 @@ class SDCard:
|
||||
self.spi.readinto(self.tokenbuf, 0xFF)
|
||||
if self.tokenbuf[0] == _TOKEN_DATA:
|
||||
break
|
||||
time.sleep_ms(1)
|
||||
else:
|
||||
self.cs(1)
|
||||
raise OSError("timeout waiting for response")
|
||||
|
Loading…
Reference in New Issue
Block a user