Page 1 of 1

ESP32-CAM: what is the maximum capacity of the microSD card ?

Posted: Sat Feb 29, 2020 10:21 pm
by nounours18200
Hi,

I would like to know what is the maximum capacity of the microSD card to remain fully compatible with the ESP-32 CAM specifications: 32 Gb ? more than 32Gb ?

Thank you for your reply,
Nounours

Re: ESP32-CAM: what is the maximum capacity of the microSD card ?

Posted: Sun Mar 01, 2020 8:11 pm
by nounours18200
up...

Nobody knows ?

Re: ESP32-CAM: what is the maximum capacity of the microSD card ?

Posted: Wed Apr 15, 2020 6:27 pm
by dima0905
I think it's specified by file system FAT-32

Re: ESP32-CAM: what is the maximum capacity of the microSD card ?

Posted: Wed Apr 15, 2020 10:37 pm
by ESP_igrr
Above 32GB, the card has to be formatted using exFAT filesystem.
exFAT is supported in IDF through FatFS library, but the support is disabled by default. You can try changing #define FF_FS_EXFAT 0 in ffconf.h from 0 to 1, and then rebuild the application.

Re: ESP32-CAM: what is the maximum capacity of the microSD card ?

Posted: Mon Dec 05, 2022 11:34 am
by fasani
I know that is like 7 years ago at least.

Today I tried with ESP-IDF v5. and after checking the wiring 2 times, it does work correctly with an SPI SD card module and a 16 GB card:

Code: Select all

I (316) example: Using SPI peripheral
I (316) example: Mounting filesystem
I (326) gpio: GPIO[10]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (336) sdspi_transaction: cmd=52, R1 response: command not supported
I (386) sdspi_transaction: cmd=5, R1 response: command not supported
I (426) example: Filesystem mounted
Name: SC16G
Type: SDHC/SDXC
Speed: 20 MHz
Size: 15193MB
CSD: ver=2, sector_size=512, capacity=31116288 read_bl_len=9
SSR: bus_width=1
I (436) example: Opening file /sdcard/hello.txt
I (456) example: File written
I (466) example: Renaming file /sdcard/hello.txt to /sdcard/foo.txt
I (476) example: Reading file /sdcard/foo.txt
I (476) example: Read from file: 'Hello SC16G!'
Same example with a 32 GB card does not work, dropping a:

sdmmc_card_init failed (0x107) error

It seems for me that an SD formatted or partitioned above 30GB is already too big to get initialized.

Re: ESP32-CAM: what is the maximum capacity of the microSD card ?

Posted: Mon Dec 05, 2022 11:17 pm
by chegewara
Recently i tested esp-idf 4.4.3 or something with SD_MMC 1/4-bits and SPI on S3 and i can use 64GB sd card with no issue:

Code: Select all

Name: SN64G
Type: SDHC/SDXC
Speed: 40 MHz
Size: 60906MB
It probably depends on sd card manufacturer and type. Also there is no need to format in exFat, its working with FATxx format.

Re: ESP32-CAM: what is the maximum capacity of the microSD card ?

Posted: Tue Dec 06, 2022 3:45 pm
by ESP_igrr
fasani wrote: Same example with a 32 GB card does not work, dropping a:

sdmmc_card_init failed (0x107) error

It seems for me that an SD formatted or partitioned above 30GB is already too big to get initialized.
This is a general error when the driver fails to fully initialize the card. It may happen with specific types/brands of cards, but in general the card size is not the root cause of such failure. If you tell us the vendor and the model of the card, we can try to purchase the same and debug this problem.

Re: ESP32-CAM: what is the maximum capacity of the microSD card ?

Posted: Sat Jan 14, 2023 7:55 am
by listout
fasani wrote:
Mon Dec 05, 2022 11:34 am
I know that is like 7 years ago at least.

Today I tried with ESP-IDF v5. and after checking the wiring 2 times, it does work correctly with an SPI SD card module and a 16 GB card:

Code: Select all

I (316) example: Using SPI peripheral
I (316) example: Mounting filesystem
I (326) gpio: GPIO[10]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (336) sdspi_transaction: cmd=52, R1 response: command not supported
I (386) sdspi_transaction: cmd=5, R1 response: command not supported
I (426) example: Filesystem mounted
Name: SC16G
Type: SDHC/SDXC
Speed: 20 MHz
Size: 15193MB
CSD: ver=2, sector_size=512, capacity=31116288 read_bl_len=9
SSR: bus_width=1
I (436) example: Opening file /sdcard/hello.txt
I (456) example: File written
I (466) example: Renaming file /sdcard/hello.txt to /sdcard/foo.txt
I (476) example: Reading file /sdcard/foo.txt
I (476) example: Read from file: 'Hello SC16G!'
Same example with a 32 GB card does not work, dropping a:

sdmmc_card_init failed (0x107) error

It seems for me that an SD formatted or partitioned above 30GB is already too big to get initialized.
I've the exact same problem. My 16GB sd cards works fine but can't get 32GB sd cards to mount, keep getting sdmmc_card_init failed (0x107) error. I've filed a bug report here: https://github.com/espressif/esp-idf/issues/10542. Here is outoput of failure with verbose logging: https://gist.github.com/listout/73d0ce5 ... 5b810b0080

It would be extremely helpful if someone could help.

P.S. Tried enabling exFAT, doesn't work.

Re: ESP32-CAM: what is the maximum capacity of the microSD card ?

Posted: Sun Oct 15, 2023 3:15 am
by fasani
HI @ESP_igrr
And sorry for the very long delay! It's been ages I don't come back here.
The card was a SanDisk Ultra 32 GB
Image

Re: ESP32-CAM: what is the maximum capacity of the microSD card ?

Posted: Sat Dec 09, 2023 11:23 pm
by swdw973
I'm having the same issue with a SanDisk 32GB card
Mine is a a microSDHC UHS-I card speed Class 10 A1