Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SD-card not working #17

Closed
sandmen opened this issue Dec 31, 2022 · 8 comments
Closed

SD-card not working #17

sandmen opened this issue Dec 31, 2022 · 8 comments

Comments

@sandmen
Copy link

sandmen commented Dec 31, 2022

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

@PlastiBots
Copy link

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

@sandmen
Copy link
Author

sandmen commented Jan 2, 2023

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.

@mmMicky
Copy link
Contributor

mmMicky commented Jan 3, 2023

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

@sandmen
Copy link
Author

sandmen commented Jan 3, 2023

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

have a look here
espressif/esp-idf#8521

@PlastiBots
Copy link

PlastiBots commented Jan 7, 2023

@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

@sandmen
Copy link
Author

sandmen commented Jan 7, 2023

@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;

@PlastiBots
Copy link

PlastiBots commented Jan 7, 2023

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.

@lewisxhe
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants