Fix is as following:
-
Lower the communication frequency as the breadboard does not seem to be compatible with the default 20MHz
for example, use the following:
Code: Select all
sdmmc_host_t host = SDSPI_HOST_DEFAULT();
host.max_freq_khz = SDMMC_FREQ_DEFAULT/2; // <- added line, SDMMC_FREQ_PROBING could be used too
- Also, as @chegewara mentioned.
Use 5 volts input (as the 3.3 volts input won't work)
Note: I didn't have to add any external pull-ups
Edit
Setting the
max_freq_khz to any value less than the
SDMMC_FREQ_DEFAULT and more than the
SDMMC_FREQ_PROBING will enforce the use of
SDMMC_FREQ_PROBING* which is a pretty low frequency, for example, for the a2dp_source example.
To go around that, one needs to set the
sdmmc_types.h(line~135):SDMMC_FREQ_DEFAULT to a new value (
may be 5000).
* Reference snippet from sdmmc_common.c(line~200):
Code: Select all
uint32_t selected_freq = SDMMC_FREQ_PROBING;
for (int i = 0; i < n_freq_values; ++i) {
uint32_t freq = freq_values[i];
if (card->max_freq_khz >= freq) {
selected_freq = freq;
break;
}
}