diff --git a/bdk/storage/sdmmc.c b/bdk/storage/sdmmc.c index 306527e..f87fcfb 100644 --- a/bdk/storage/sdmmc.c +++ b/bdk/storage/sdmmc.c @@ -846,6 +846,9 @@ static int _sd_storage_get_op_cond(sdmmc_storage_t *storage, bool is_sdsc, int b // Switch to 1.8V signaling. if (_sdmmc_storage_execute_cmd_type1(storage, SD_SWITCH_VOLTAGE, 0, 0, R1_STATE_READY)) { + if (!sdmmc_setup_clock(storage->sdmmc, SDHCI_TIMING_UHS_SDR12)) + return 0; + if (!sdmmc_enable_low_voltage(storage->sdmmc)) return 0; diff --git a/bdk/storage/sdmmc_driver.c b/bdk/storage/sdmmc_driver.c index b6e5e1e..97d163c 100644 --- a/bdk/storage/sdmmc_driver.c +++ b/bdk/storage/sdmmc_driver.c @@ -1418,9 +1418,6 @@ int sdmmc_enable_low_voltage(sdmmc_t *sdmmc) if (sdmmc->id != SDMMC_1) return 0; - if (!sdmmc_setup_clock(sdmmc, SDHCI_TIMING_UHS_SDR12)) - return 0; - _sdmmc_commit_changes(sdmmc); // Switch to 1.8V and wait for regulator to stabilize. Assume max possible wait needed.