Skip to content

Commit af95348

Browse files
authored
Merge pull request #4096 from Guozhanxin/sdio_fix
完善sdio框架中切换到高速模式时的时钟设置
2 parents fba1d75 + bb01692 commit af95348

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/drivers/sdio/sdio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -892,9 +892,9 @@ static rt_int32_t sdio_init_card(struct rt_mmcsd_host *host, rt_uint32_t ocr)
892892

893893
if (card->flags & CARD_FLAG_HIGHSPEED)
894894
{
895-
mmcsd_set_clock(host, 50000000);
896-
}
897-
else
895+
mmcsd_set_clock(host, card->host->freq_max > 50000000 ? 50000000 : card->host->freq_max);
896+
}
897+
else
898898
{
899899
mmcsd_set_clock(host, card->cis.max_tran_speed);
900900
}

0 commit comments

Comments
 (0)