Page 1 of 1

SD card examples weird results.

Posted: Sat May 27, 2023 8:24 am
by pacoandres
I'm doing some experiments for a project in which I need a SDCard for storage, and by now the results are weird and I can't find why.

Using ESP-IDF (v5.0.1):
  • 4 bit interface: does not work at any bus speed. Always get CRC error at SDCard init:

    Code: Select all

    sdmmc_init_sd_ssr: sdmmc_send_cmd returned 0x109
  • 1 bit interface: works at any speed.
Using Arduino (Espressif package v2.0.9):
  • 4 bit interface: woks only at BOARD_MAX_SDMMC_FREQ and SDMMC_FREQ_52M bus speed. At any other speed throws CRC error at SDCARD init, as ESP-IDF.
  • 1 bit interface: works at any speed.
The hardware I'm using is a WROVER-B with the mandatory pull-ups and a high side switch for preventing GPIO12 and GPIO2 pulled up on boot.

Does anyone have any idea about why this results?

Thanks.

Re: SD card examples weird results.

Posted: Sun Jun 04, 2023 11:55 pm
by jgustavoam
Pacondres,
I've been doing tests with SDMMC (4 bits) using Arduino and it works perfectly. What type of SD card are you using?
There are numerous types, with very varied access speeds.

https://github.com/espressif/arduino-es ... ies/SD_MMC

https://www.sdcard.org/developers/sd-st ... eed-class/

Re: SD card examples weird results.

Posted: Mon Jun 05, 2023 6:58 am
by pacoandres
Thanks for the answer.
I've been doing tests with SDMMC (4 bits) using Arduino and it works perfectly
That's what I'm saying. Using Arduino the example works (not at all speeds but at the highest ones does), the problem is that doesn't work using ESP-IDF.
The ESP-IDF example only works in 1 bit mode.