Hello,
recently I bought MicroSD card module but I have issue to make it work.
At the beginning I've connected it according to the manual using "slot 3" but I get en error:
MicroPython v1.16 on 2021-06-23; ESP32 module with ESP32
Type "help()" for more information.
>>>
>>> import os, machine
>>> sd=machine.SDCard(slot=3)
>>> os.mount(sd, "/sd")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: 16
>>>
Then I've changed connections to different pins:
sd=machine.SDCard(miso=12, mosi=13, sck=14, cs=15)
but with no luck.
I also changed frequency to lower than default one (e.g. 2Mhz, 1Mhz, 500KHz or 100KHz) but I get the same error.
Card is 2GB Kingston, formatted to FAT32, having 1 partition - mounted on computer it works.
Do you have any idea what could be root cause of this error ?
MicroSD card module and mounting error
Re: MicroSD card module and mounting error
Hi @ehyre,
Seems like it can be any number of things like a faulty wire or bad module or finicky SD card. Have you tried another SD card?
I have my SD card wired to the slot 2, pins (ESP32 devkitc):
SD_SCK 18
SD_MISO 19
SD_MOSI 23
SD_CS 5
And when I try to mount slot 3 I get similar error code:
When I mount slot 2 it works for me:
Seems like it can be any number of things like a faulty wire or bad module or finicky SD card. Have you tried another SD card?
I have my SD card wired to the slot 2, pins (ESP32 devkitc):
SD_SCK 18
SD_MISO 19
SD_MOSI 23
SD_CS 5
And when I try to mount slot 3 I get similar error code:
Code: Select all
MicroPython v1.15-835-g1fcd6e97f-dirty on 2021-08-21; ESP32 module (spiram) with ESP32
Type "help()" for more information.
>>> import os, machine
>>> sd=machine.SDCard(slot=3)
>>> os.mount(sd, "/sd")
E (30329) sdmmc_sd: sdmmc_init_sd_if_cond: send_if_cond (1) returned 0x108
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: 16
Code: Select all
MicroPython v1.15-835-g1fcd6e97f-dirty on 2021-08-21; ESP32 module (spiram) with ESP32
Type "help()" for more information.
>>> import os, machine
>>> sd=machine.SDCard(slot=2)
>>> os.mount(sd, "/sd")
>>> os.listdir('/')
['sd', 'boot.py']
Re: MicroSD card module and mounting error
Hi,
problem was / is with this 2GB card. Other 8GB or even 64GB works.
Thank you for your replay.
problem was / is with this 2GB card. Other 8GB or even 64GB works.
Thank you for your replay.
Re: MicroSD card module and mounting error
Nice! Glad to hear its working