ESP_rrtandler! I'm sorry, I missed your answer!
SO, I tested many variants. Module I use are:

- photo_2025-02-04_11-49-17.jpg (273.26 KiB) Viewed 6009 times
All modules based on ESP-WROOM-32 ESP32-WROOM-32UE
Code: Untitled.c Select all
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
.........
I (31) boot: ESP-IDF v5.4 2nd stage bootloader
I (31) boot: compile time Feb 4 2025 10:24:37
I (31) boot: Multicore bootloader
I (32) boot: chip revision: v3.1
I (35) boot.esp32: SPI Speed : 40MHz
I (39) boot.esp32: SPI Mode : DIO
I (42) boot.esp32: SPI Flash Size : 4MB
Adapter I using has 10K pullup resistors, also on my custom board pullup resistors exists too.
PIN MAP:
Code: Untitled.c Select all
CONFIG_EXAMPLE_FORMAT_IF_MOUNT_FAILED=y
CONFIG_EXAMPLE_FORMAT_SD_CARD=y
CONFIG_EXAMPLE_PIN_MOSI=23
CONFIG_EXAMPLE_PIN_MISO=19
CONFIG_EXAMPLE_PIN_CLK=18
CONFIG_EXAMPLE_PIN_CS=27
Cards I using:

- photo_2025-02-04_12-00-54.jpg (116.74 KiB) Viewed 6009 times
Of course, I would like to save money and use 4-32GB memory cards.
Code example, I using -
https://github.com/espressif/esp-idf/bl ... /README.md
Debug logs (LOG LEVEL DEBUG)
Full log since boot -
https://gist.github.com/sazanof/8d0a382 ... a746232306
Code: Untitled.c Select all
D (725) spi_flash: trying chip: issi
D (729) spi_flash: trying chip: gd
D (732) spi_flash: trying chip: mxic
D (736) spi_flash: trying chip: winbond
D (740) spi_flash: trying chip: generic
I (744) spi_flash: detected chip: generic
I (748) spi_flash: flash io: dio
.....
I (815) main_task: Calling app_main()
I (825) example: Initializing SD card
I (825) example: Using SPI peripheral
D (835) spi: SPI2 use gpio matrix.
I (835) example: Mounting filesystem
D (835) sdspi_host: sdspi_host_init_device: SPI2 cs=27 cd=-1 wp=-1 wp_polarity:0
D (845) intr_alloc: Connected src 30 to int 5 (cpu 0)
D (855) spi_hal: eff: 400, limit: 26666k(/2), 0 dummy, -1 delay
D (855) spi_master: SPI2: New device added to CS5, effective clock: 400000 Hz
I (865) gpio: GPIO[27]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
D (875) spi_master: device5 locked the bus
D (875) spi_master: device5 release bus
D (885) sdspi_host: sdspi_host_start_command: cmd=52 error=0x107
D (885) sdmmc_cmd: cmd=52, sdmmc_req_run returned 0x107
D (895) spi_master: device5 locked the bus
D (895) spi_master: device5 release bus
D (925) spi_master: device5 locked the bus
D (925) spi_master: device5 release bus
D (945) spi_master: device5 locked the bus
D (945) spi_master: device5 release bus
D (945) sdmmc_sd: SDHC/SDXC card
D (945) spi_master: device5 locked the bus
D (945) spi_master: device5 release bus
D (945) sdspi_host: sdspi_host_start_command: cmd=5 error=0x107
D (955) sdmmc_cmd: cmd=5, sdmmc_req_run returned 0x107
D (955) sdmmc_io: sdmmc_init_io: io_send_op_cond (1) returned 0x107; not IO card
D (965) spi_master: device5 locked the bus
D (975) spi_master: device5 release bus
D (975) sdspi_host: data CRC set=1
D (975) sdspi_transaction: cmd=59, R1 response: command not supported
D (985) sdmmc_cmd: cmd=59, sdmmc_req_run returned 0x106
E (995) sdmmc_sd: sdmmc_init_spi_crc: sdmmc_send_cmd_crc_on_off returned 0x106
D (995) sdmmc_init: sdmmc_card_init: sdmmc_init_spi_crc returned 0x106
E (1005) vfs_fat_sdmmc: sdmmc_card_init failed (0x106).
I (1015) gpio: GPIO[27]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
E (1025) example: Failed to initialize the card (ESP_ERR_NOT_SUPPORTED). Make sure SD card lines have pull-up resistors in place.
I (1035) main_task: Returned from app_main()
Schematics I using on custom board:

- photo_2025-02-04_12-17-06.jpg (171.14 KiB) Viewed 6009 times
Success connection of 64Gb card (log output):
https://gist.github.com/sazanof/c7a9075 ... 7d137f2f43
Code: Untitled.c Select all
I (825) example: Initializing SD card
I (825) example: Using SPI peripheral
D (835) spi: SPI2 use gpio matrix.
I (835) example: Mounting filesystem
D (835) sdspi_host: sdspi_host_init_device: SPI2 cs=27 cd=-1 wp=-1 wp_polarity:0
D (845) intr_alloc: Connected src 30 to int 5 (cpu 0)
D (855) spi_hal: eff: 400, limit: 26666k(/2), 0 dummy, -1 delay
D (855) spi_master: SPI2: New device added to CS5, effective clock: 400000 Hz
I (865) gpio: GPIO[27]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
D (875) spi_master: device5 locked the bus
D (875) spi_master: device5 release bus
I (885) sdspi_transaction: cmd=52, R1 response: command not supported
D (895) sdmmc_cmd: cmd=52, sdmmc_req_run returned 0x106
D (895) spi_master: device5 locked the bus
......
D (945) sdmmc_sd: SDHC/SDXC card
D (945) spi_master: device5 locked the bus
D (945) spi_master: device5 release bus
I (945) sdspi_transaction: cmd=5, R1 response: command not supported
D (955) sdmmc_cmd: cmd=5, sdmmc_req_run returned 0x106
D (965) sdmmc_io: sdmmc_init_io: io_send_op_cond (1) returned 0x106; not IO card
D (965) spi_master: device5 locked the bus
D (975) spi_master: device5 release bus
D (975) sdspi_host: data CRC set=1
D (975) spi_master: device5 locked the bus
...
D (1025) sdmmc_common: host_ocr=0xff8000 card_ocr=0xc0ff8000
D (1025) sdmmc_common: sdmmc_card_init: host_ocr=00ff8000, card_ocr=c0ff8000
D (1035) sdmmc_init: sdmmc_card_init: card type is SD
...
D (1085) sdspi_host: Setting card clock to 10000 kHz
D (1095) spi_hal: eff: 10000, limit: 26666k(/2), 0 dummy, -1 delay
D (1095) spi_master: SPI2: New device added to CS5, effective clock: 10000000 Hz
...
D (1125) vfs_fat_sdmmc: using pdrv=0
...
I (1185) example: Filesystem mounted
Name: EC1S5
Type: SDHC
Speed: 10.00 MHz (limit: 10.00 MHz)
Size: 61120MB
CSD: ver=2, sector_size=512, capacity=125173760 read_bl_len=9
SSR: bus_width=1
I (1205) example: Opening file /sdcard/hello.txt
...
I (1755) example: File written
I (1765) example: Reading file /sdcard/nihao.txt
...
I (1805) example: Read from file: 'Nihao EC1S5!'
I (1805) gpio: GPIO[27]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1815) example: Card unmounted
I (1815) gpio: GPIO[23]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1825) gpio: GPIO[19]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1835) gpio: GPIO[18]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
But other SD cards - ERROR. Can you help me to solve problem?