Hello everyone,
Relatively beginner, I have always had problems with the management of SD cards. I use it for data recording when I don’t have WiFi access.
First question :
Regularly, I have cards that not only become unreadable but unformattable. I must have lost about ten.
If you have an explanation?
Second question:
The SD cards I use are originally formatted in FT32 and are “mounted” correctly during setup.
The mounting of the last cards I bought fails.
I noticed that they are formatted in ex-FAT!
Hence my questions:
How to reformat a card in FAT32? The tool is no longer available on windows 10.
Can we modify the code so that it accepts a card formatted in ex-FAT?
Many thanks in advance for your attention.
Mark
Hi.
Regularly experiencing issues with the microSD card can be related to the following:
- low-quality SD cards can lead easily to data corruption. Which brand of SD card are you using?
- If the ESP32 doesn’t have a proper power supply, that may also cause issues with the microSD card. What is the microSD card module you’re using? Some require 5V instead of 3.3V
Which microSD library/examples are you using?
I also found the following information shared by one of our readers that might be the answer for your problems. Here’s his advice:
”
First, a fact (as far as I can tell, and as far as I have actually tested):
SD cards formatted as FAT32 work just fine with the SD and FS libraries. Cards formatted as exFAT do not work.
Second, the not-so-good news…
SD Cards larger than 32 MBytes are (usually) supplied formatted as exFAT. You can’t format these large devices with the ‘usual’ Windows 10 format program. The funny thing is that if you format the large cards as FAT32 (using some kind of third-party application) Windows 10 can read and write them just fine.
Finally, The Good News…
I have just now used fat32format.exe from Ridgecrop Consultants to format my Kingston 64 GByte SD card as FAT32 and tested it with the Arduino SD and FS libraries shown in this example. (My present ESP application is using a 16 GB SD card, but your question piqued my interest, and led me to discover something that I very well may find useful for future projects.)
”
I hope this helps.
Let me know your feedback.
Regards,
Sara
Hello Sarah,
Thank you for your interest 🙂
To answer your questions :
I have several brands of SD cards in my surviving stock
Quomox 8GB FAT32 working OK
Kingston 64 GB (error..) ex-FAT not working
PNY 16 GB (dead..)
The SD card reader: I have several. They work).
The pinout is not always indicated.
mySD.h or SD.h library
Model: an excellent
https://RandomNerdTutorials.com/esp32-microsd-card-arduino/
Formatting ex-FAT cards: I was advised SD Card Formatter by TUXERA. It does not work.
I looked for the RidgeCrop software that you recommended to me. I found a “HPUSBDisk.exe” that must be run as administrator.
We start with an error message (write protection), then the formatting takes place. I get a 58.2 GB FAT32 volume from a 64 GB ex-FAT disk.
Disappointment: it still doesn’t work.
The original fault is to have bought (by mistake) a card of 64 GB.
At least I understood!
Thank you for this precious help.
Cordially,
Mark
Mark
I’m sorry.
I never had that problem before. I was always able to format a microSD card as FAT32, but I don’t think I have tried with a 64GB card.
That’s too bad that you can’t use those microSD cards. But the fact that they are ex-FAT type is probably what’s causing the issues.
Regards,
Sara
Hello Sarah,
My 64 GB ex-Fat card was reformatted to FAT32, thanks to your advice. There are 58.2 GB left but it still does not work..
The size of the card must also intervene. I had read somewhere that cards > 8 GB should be avoided. Such cards become relatively difficult to find
Cordially,
Mark