QUERY · ISSUE
ESP32: SDCard throws Errors
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
ESP32 Cannot mount SD Card on Wemos LOLIN D32 Pro V2.0.0
port-esp32
Firmware:
esp32spiram-20210623-v1.16.bin
Board:
Wemos LOLIN D32 Pro V2.0.0, ESP32-WROVER, ESP32-D0WDQ6 (revision 1)
According the Wemos D32 Pro Schematic and verified using a continuity meter, the SD card pins are as follows:
- SCK: GPIO18
- MOSI: GPIO23
- MISO: GPIO19
- CS: GPIO4
Trying to mount the SD card but encountering the following error:
>>> import uos, machine
>>> uos.mount(machine.SDCard(slot=2, width=1, sck=18, mosi=23, miso=19, cs=4), '/sd')
E (61965) sdmmc_sd: sdmmc_init_spi_crc: sdmmc_send_cmd_crc_on_off returned 0x106
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: 16