• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Problems connecting ESP32 to SD-card reader

Q&A Forum › Category: ESP32 › Problems connecting ESP32 to SD-card reader
0 Vote Up Vote Down
Ronald Keus asked 4 years ago

Dear Sara, Rui, first of all: your book Learn ESP32 with Arduino IDE is perfect. Everything works immediately and as promised. I’ve by now tested many programs and they are all OK.
However, I have a quite trivial problem with writing to an SD-card. I’m using two identical SD-card modules exactly like the ones you use in one of the programs on your web-site: the small 3,3V-ones. And I’m using 4 different (two different brands) ESP32 Devkit V1 in combination wih two different 32MB HC-1 microSD-cards. When I use your program in the library SD(esp32) SD-test, in each and every combination of my ESP32’s and SD card modules, in about 30% of the runs I get the message “card mount failed”. My question now is:
1) any idea why this is the case?
2) woud using the SD_MMC library and “configuration” (whatever that is) solve the problem?
3) could the size of the microSD-cards; 32MB HC-1, cause the problem?
4) most important: since your proram in the library “SD(esp32) SD-test” is quite complicated, is there a program for the combination ESP32/SD-card that simply writes and reads data without further stuff, like the ones that exist for the Arduino?
Thanks in advance for your reply, Ronald Keus

1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi Ron.
 
To be honest, I’m not sure why you get the “card mount failed” sometimes. I don’t think the SD_MMC library configuration will make a different. Please note that if you want to use SD_MMC, your microSD card module must support SD_MMC (the modules we use don’t have SD_MMC support). There are other microSD card modules that support SD_MMC.
 
As for the microSD card, they must be formatted as FAT32.
 
We have this tutorial about the microSD card with the ESP32 (this is probably the example you’ve already tested): https://randomnerdtutorials.com/esp32-microsd-card-arduino/#handlefilesmicrosdcard
 
Regards,
Sara
 
 
 

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.