I need help with SD Card

Hello everyone. I’m trying to use a SD card with my ESP32. I’m using a Catalex module.


E (13287) sdmmc_sd: sdmmc_check_scr: send_scr returned 0x107
Thread 1 exited with exception OSError @[009B:0093:0000:0000:0000:0000:0000:0000]
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
mode:DIO, clock div:2
ho 0 tail 12 room 4
ho 0 tail 12 room 4
entry 0x400806c0
E (32) boot: OTA: -1/-1  -1/-1  -1/-4
E (33) boot: Invalid ota, returning default vm 0
E (33) boot: Starting vm

I’m doing something wrong, but what? :thinking:

import fatfs
import os

fatfs.mount('0:',{"drv":SPI1,"cs":D22,"clock":1000000} )

arquivo = os.open('0:zerynth.txt','w+')
arquivo.write("foo ", sync = True)

I appreciate all the help. Oh, I would like to congratulate the entire Zerynth team. I am learning Python and ESP32 from Zerynth. It only took me a week to stop all my 8-bit microcontroller-based projects and restart them using ESP32. You are amazing! :grinning:

Best regards.

1 Like

Hi @Nysix
The error

Is actually an error from ESP-IDF, that refers to initialization failure, propably due to fault connection.
Please have a look at this doc.
For now, Try the file system example just to be sure that it is not a software error, and check the hardware connections.
And let me know how it goes :smile:

1 Like

Thank you @karimhamdy1 . With another SD module I could make it work. I think Catalex is not appropriate to work with ESP32 due the level translator.

I feel a little lost with those error messages. :sweat_smile: