mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
fix(sdmmc): Handle nonsensical max freq correctly
Closes https://github.com/espressif/esp-idf/issues/15250
This commit is contained in:
@@ -275,7 +275,7 @@ esp_err_t sdmmc_enter_higher_speed_mode(sdmmc_card_t* card)
|
||||
ESP_LOGE(TAG, "%s: failed to switch bus to DDR mode (0x%x)", __func__, err);
|
||||
return err;
|
||||
}
|
||||
} else if (card->host.max_freq_khz == SDMMC_FREQ_SDR104) {
|
||||
} else if (card->host.max_freq_khz >= SDMMC_FREQ_SDR104) {
|
||||
//UHS-I SDR104
|
||||
ESP_LOGV(TAG, "%s: to switch to SDR104", __func__);
|
||||
if ((supported_mask & BIT(SD_ACCESS_MODE_SDR104)) == 0) {
|
||||
@@ -287,7 +287,7 @@ esp_err_t sdmmc_enter_higher_speed_mode(sdmmc_card_t* card)
|
||||
ESP_LOGD(TAG, "%s: sdmmc_send_cmd_switch_func (2) returned 0x%x", __func__, err);
|
||||
goto out;
|
||||
}
|
||||
} else if (card->host.max_freq_khz == SDMMC_FREQ_SDR50) {
|
||||
} else if (card->host.max_freq_khz >= SDMMC_FREQ_SDR50) {
|
||||
//UHS-I SDR50
|
||||
ESP_LOGV(TAG, "%s: to switch to SDR50", __func__);
|
||||
if ((supported_mask & BIT(SD_ACCESS_MODE_SDR50)) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user