diff options
| author | guozhanxin <[email protected]> | 2020-11-27 17:28:49 +0800 |
|---|---|---|
| committer | guozhanxin <[email protected]> | 2020-11-27 17:28:49 +0800 |
| commit | bb016927f8a5ef4121e2e0c899291642c0087b71 (patch) | |
| tree | 90d09064c4e06536526f21786db5429b4e8c07a1 | |
| parent | dfa99ad16546c2b1b03187e634201295606f4246 (diff) | |
Improve the clock Settings for switching to high speed mode in the SDIO framework.
| -rw-r--r-- | components/drivers/sdio/sdio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/drivers/sdio/sdio.c b/components/drivers/sdio/sdio.c index 65bf87b895..f5d97cdd08 100644 --- a/components/drivers/sdio/sdio.c +++ b/components/drivers/sdio/sdio.c @@ -892,9 +892,9 @@ static rt_int32_t sdio_init_card(struct rt_mmcsd_host *host, rt_uint32_t ocr) if (card->flags & CARD_FLAG_HIGHSPEED) { - mmcsd_set_clock(host, 50000000); - } - else + mmcsd_set_clock(host, card->host->freq_max > 50000000 ? 50000000 : card->host->freq_max); + } + else { mmcsd_set_clock(host, card->cis.max_tran_speed); } |
