Skip to content

sdcardio: "OSError: can't set 512 block size" for some 32GB cards after 9.2.4 #10663

@dhalbert

Description

@dhalbert

Somewhere between 9.2.4 and 9.2.5 some 32GB SD cards started failing with OSError: can't set 512 block size. I can reproduce this with a Micro Center card I have on PyPortal. EDIT: This is only on atmel-samd.

Test program:

import board
import sdcardio
import storage
import time

spi = board.SPI()
cs = board.SD_CS

print("mounting sd card...")
sdcard = sdcardio.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
print("sd card mounted")

count = 0
while True:
    print("sleep 1", count)
    count += 1
    time.sleep(1)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions