问答

汇集网友智慧,解决技术难题

21ic问答首页 - GD32外接16Mhz晶振,计算后倍频是小数,如何解决?

hz 倍频 晶振 rc PLL ck

GD32外接16Mhz晶振,计算后倍频是小数,如何解决?

HCFll2021-10-05
#if (defined(GD32F10X_MD) || defined(GD32F10X_HD) || defined(GD32F10X_XD))
    /* select HXTAL/2 as clock source */
    RCU_CFG0 &= ~(RCU_CFG0_PLLSEL | RCU_CFG0_PREDV0);
    RCU_CFG0 |= (RCU_PLLSRC_HXTAL | RCU_CFG0_PREDV0);

    /* CK_PLL = (CK_HXTAL/2) * 27 = 108 MHz */
    RCU_CFG0 &= ~(RCU_CFG0_PLLMF | RCU_CFG0_PLLMF_4);
    //RCU_CFG0 |= RCU_PLL_MUL27;
//这里CK_HXTAL为16MHz,所以计算倍频得13.5,那么应该选RCU_PLL_MUL13还是RCU_PLL_MUL14呢?
                RCU_CFG0 |= RCU_PLL_MUL13;//??RCU_PLL_MUL14??


回答 +关注 0
3231人浏览 1人回答问题 分享 举报
1 个回答

您需要登录后才可以回复 登录 | 注册