← index #8290Issue #8121
Related · high · value 0.693
QUERY · ISSUE

ESP32: SDCard throws Errors

openby Narsskrarcopened 2022-02-10updated 2024-09-08
needs-info

Hi,

I try to access a SD card with MP V 1.18. The reader is connected to slot 2. The hardware seem to work (tested with an ESP32 with C code). It's a 8GB SDHC formatted with FAT32.

I do
sd = SDCard(slot=2)

Now
sd.info()
throws
OSError: (-265, 'ESP_ERR_INVALID_CRC')

and
os.mount(sd, "/sd")
throws
OSError: 16

16 seems to be EBUSY, although this errorcode isn't defined in errno.errorcode... and it doesn't help me either.

What can I do to investigate what goes wrong?

Thanks.

CANDIDATE · ISSUE

ESP32S3 with SPIRAM, Failure to Mount SD Card

closedby TGiles1998opened 2021-12-27updated 2022-03-15
port-esp32

Hi,

Looking at the default slot 1 to mount the SD card:

SCK = 36,
MOSI = 35,
MISO = 37,
CS = 34,

The CS is not broken out to a GPIO pin and is also used as the CS for external RAM.

I tried to reassign the CS pin:

sd = machine.SDCard(slot=1, cs=5)

and mount it:

os.mount(sd, "/sd")

but produces the error:

E (55849) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: 16

Any help would be great thanks!

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied