void RCC_Configuration(void)
{
RCC_DeInit(); /*将外设RCC寄存器重设为缺省值 */
// SystemInit();//源自system_stm32f10x.c文件,只需要调用此函数,则可完成RCC的配置.具体请看2_RCC
RCC_HSEConfig(RCC_HSE_OFF);
RCC_HSICmd(ENABLE); //打开内部时钟
while(RCC_GetFlagStatus(RCC_FLAG_HSIRDY) == RESET);
FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);
FLASH_SetLatency(FLASH_Latency_1);
/* HCLK = SYSCLK */
RCC_HCLKConfig(RCC_SYSCLK_Div1);
//APB2
RCC_PCLK2Config(RCC_HCLK_Div1);
//APB1
RCC_PCLK1Config(RCC_HCLK_Div2);
//adc
RCC_ADCCLKConfig(RCC_PCLK2_Div4);//配置ADC时钟= PCLK2/4
//PLL 倍频
RCC_PLLConfig(RCC_PLLSource_HSI_Div2, RC
{
RCC_DeInit(); /*将外设RCC寄存器重设为缺省值 */
// SystemInit();//源自system_stm32f10x.c文件,只需要调用此函数,则可完成RCC的配置.具体请看2_RCC
RCC_HSEConfig(RCC_HSE_OFF);
RCC_HSICmd(ENABLE); //打开内部时钟
while(RCC_GetFlagStatus(RCC_FLAG_HSIRDY) == RESET);
FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);
FLASH_SetLatency(FLASH_Latency_1);
/* HCLK = SYSCLK */
RCC_HCLKConfig(RCC_SYSCLK_Div1);
//APB2
RCC_PCLK2Config(RCC_HCLK_Div1);
//APB1
RCC_PCLK1Config(RCC_HCLK_Div2);
//adc
RCC_ADCCLKConfig(RCC_PCLK2_Div4);//配置ADC时钟= PCLK2/4
//PLL 倍频
RCC_PLLConfig(RCC_PLLSource_HSI_Div2, RC