我用stm32f103c8t6写程序,原来晶振是12M,
Stm32_Clock_Init(1); //12MHz
void Stm32_Clock_Init(uint8_t PLL)
{
uint8_t temp;
RCC_DeInit();
RCC->CR|=0x00010000;
while(!(RCC->CR & 0X00020000));
RCC->CFGR=0X00000000;
FLASH->ACR|=0x30;
RCC->CFGR|=0x00000001;
temp = 0;
while(temp!=0x01)
{
temp=RCC->CFGR>>2;
temp&=0x03;
}
RCC->APB2ENR|=1<<0; //SYSCFG
}
现在晶振换成了8M。请问如何修改设置。谢谢
|