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

nounours18200
Posts: 10
Joined: Fri Nov 15, 2019 4:57 pm

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

Postby nounours18200 » Sat Feb 29, 2020 10:21 pm

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

nounours18200
Posts: 10
Joined: Fri Nov 15, 2019 4:57 pm

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

Postby nounours18200 » Sun Mar 01, 2020 8:11 pm

up...

Nobody knows ?

dima0905
Posts: 5
Joined: Mon Jan 20, 2020 8:48 pm

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

Postby dima0905 » Wed Apr 15, 2020 6:27 pm

I think it's specified by file system FAT-32

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

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

Postby ESP_igrr » Wed Apr 15, 2020 10:37 pm

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.

User avatar
fasani
Posts: 197
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

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

Postby fasani » 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.
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

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

Postby chegewara » Mon Dec 05, 2022 11:17 pm

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.

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

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

Postby ESP_igrr » Tue Dec 06, 2022 3:45 pm

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.

listout
Posts: 31
Joined: Wed Mar 16, 2022 10:54 am

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

Postby listout » Sat Jan 14, 2023 7:55 am

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.

User avatar
fasani
Posts: 197
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

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

Postby fasani » Sun Oct 15, 2023 3:15 am

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
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

swdw973
Posts: 1
Joined: Sat Dec 09, 2023 11:19 pm

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

Postby swdw973 » Sat Dec 09, 2023 11:23 pm

I'm having the same issue with a SanDisk 32GB card
Mine is a a microSDHC UHS-I card speed Class 10 A1

Who is online

Users browsing this forum: No registered users and 34 guests