Xinyuan-LilyGO/LilyGo-T-RGB

SD-card not working

sandmen opened this issue · 8 comments

Hi,
I have tried several SD-cards.
Not one is working, or detected by the T-RGB !
Any hints?

I suggest this be merged with #13 that I created earlier - I'm having the same issue.

I suggest this be merged with #13 that I created earlier - I'm having the same issue.

Workaround, you have to reduce the Clock for SPI.
I "just" set it to half, and the board detect SD-Cards.
There is already a patch around for the latest Arduino Framework.

if (!SD_MMC.begin("/sdcard", true, true)) {
Serial.println("Card Mount Failed");
return;
}

Is for me not working... !
In SD_MMC.h
SDMMC_FREQHIGHSPEED/2 is working...

have a look here
espressif/esp-idf#8521

@sandmen, where is this variable? I looked at SD_MMC.h in my version of the ESP 2.0.4 package (C:\Users\Dave\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\libraries\SD_MMC\src) and could not find the variable: SDMMC_FREQHIGHSPEED

@PlastiBots I'm using Plaformio and this uses the version 2.0.5...
In the SD_MMC.c file, should be somewhere something like this
host.max_freq_khz = sdmmc_frequency;
Have a look for that, and check, where the sdmmc_frequency is come from !
You can do this as well
host.max_freq_khz = sdmmc_frequency/2;

Found it! Thx. Will give it a try. EDIT: Confirmed. Using if (!SD_MMC.begin("/sdcard", true, true)) and the above edit host.max_freq_khz = sdmmc_frequency/2; works.

Has the problem been solved ? If you still have problems, please reopen