adafruit / Adafruit_CircuitPython_SD

SD card drivers for Adafruit CircuitPython
MIT License
37 stars 17 forks source link

Writing greater than 1023 bytes to SDcard at once causes hang #14

Closed 0x1d00ffff closed 4 years ago

0x1d00ffff commented 5 years ago

Hey, the following code causes the circuitpython code to hang in the f.write() call. The largest value that completes successfully is 1023 bytes.

with open("/sd/bytes", "wb") as f:
    a = b"\x00" * 1030
    f.write(a)
dhalbert commented 5 years ago

Are you using adafruit_sd? This sounds like this library bug: https://github.com/adafruit/Adafruit_CircuitPython_SD/issues/11

0x1d00ffff commented 5 years ago

I am using adafruit_sdcard, yes. This sounds similar but my code hangs consistently when trying to write 1024 bytes, or more, at once. I will create an issue there, thanks

0x1d00ffff commented 5 years ago

Scratch that - code that did not work yesterday is working today. The only difference I can think of is SDCard free % - (it was empty yesterday, now it is 100kb fuller). I will try to get more insights through debugging.

Anton-2 commented 5 years ago

May be related to #25

dhalbert commented 4 years ago

We believe #20 fixes this.