我的初始化函数,请帮忙看看
void RCC_Configuration(void) { ErrorStatus HSEStartUpStatus; RCC_ClocksTypeDef Clock; RCC_DeInit();/* RCC system reset(for debug purpose) */ RCC_HSEConfig(RCC_HSE_ON);/* Enable HSE */ HSEStartUpStatus = RCC_WaitForHSEStartUp();/* Wait till HSE is ready */ if(HSEStartUpStatus == SUCCESS) { RCC_HCLKConfig(RCC_SYSCLK_Div1);/* HCLK = SYSCLK */ RCC_PCLK2Config(RCC_HCLK_Div1); /* PCLK2 = HCLK */ RCC_PCLK1Config(RCC_HCLK_Div2);/* PCLK1 = HCLK/2 */ RCC_ADCCLKConfig(RCC_PCLK2_Div6);/* ADCCLK = PCLK2/6 */ /* Flash 2 wait state ,不加下面两句话,则后面语句无法通过?*/ FLASH_SetLatency(FLASH_Latency_2); /* Enable Prefetch Buffer */ FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable); /* PLLCLK = 8/1MHz * 9 = 72 MHz */ RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9); RCC_PLLCmd(ENABLE);/* Enable PLL */ /* Wait till PLL is ready */ while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET) { } /* Select PLL as system clock source */ RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK); /* Wait till PLL is used as system clock source */ while(RCC_GetSYSCLKSource() != 0x08) { } } RCC_GetClocksFreq(&Clock); RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD | RCC_APB2Periph_GPIOE | RCC_APB2Periph_GPIOF |RCC_APB2Periph_GPIOG |RCC_APB2Periph_AFIO, ENABLE); /* TIM2 clocks enable */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE); rcc_can_user(); rcc_lcd(); rcc_rtc(); }