void RCC_AHBPeriphResetCmd(uint32_t RCC_AHBPeriph, FunctionalState NewState);//
#endif /* STM32F10X_CL */
void RCC_APB2PeriphResetCmd(uint32_t RCC_APB2Periph, FunctionalState NewState);// 强制或者释放高速APB(APB2)外设复位
//输入:同void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState);函数的值
void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState);// 强制或者释放低速APB(APB1)外设复位
//输入:同void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState);函数的值
//例:/* Enter the SPI1 peripheral to reset */
//RCC_APB2PeriphResetCmd(RCC_APB2Periph_SPI1, ENABLE);
/* Exit the SPI1 peripheral from reset */
//RCC_APB2PeriphResetCmd(RCC_APB2Periph_SPI1, DISABLE);
void RCC_BackupResetCmd(FunctionalState NewState);// 强制或者释放后备域复位
void RCC_ClockSecuritySystemCmd(FunctionalState NewState);//使能或者失能时钟安全系统
//输入:ENABLE或者DISABLE
void RCC_MCOConfig(uint8_t RCC_MCO);// 选择在MCO管脚上输出的时钟源
//输入:RCC_MCO_NoClock 无时钟被选中 ;RCC_MCO_SYSCLK 选中系统时钟;
//RCC_MCO_HSI 选中HSI ;RCC_MCO_HSE 选中HSE ;
//RCC_MCO_PLLCLK_Div2 选中PLL时钟除以2 //警告:当选中系统时钟作为MCO管脚的输出时,注意它的时钟频率不超过50MHz(最大I/O速率)。
FlagStatus RCC_GetFlagStatus(uint8_t RCC_FLAG);// 检查指定的RCC标志位设置与否
//输入:待检查的RCC标志位
//RCC_FLAG_HSIRDY ,HSI晶振就绪;RCC_FLAG_HSERDY ,HSE晶振就绪;
//RCC_FLAG_PLLRDY ,PLL就绪;RCC_FLAG_LSERDY ,LSI晶振就绪;
//RCC_FLAG_LSIRDY ,LSE晶振就绪;RCC_FLAG_PINRST ,管脚复位 ;
//RCC_FLAG_PORRST ,POR/PDR复位;RCC_FLAG_SFTRST ,软件复位 ;
//RCC_FLAG_IWDGRST ,IWDG复位;RCC_FLAG_WWDGRST ,WWDG复位;
//RCC_FLAG_LPWRRST ,低功耗复位
//返回值:RCC_FLAG的新状态(SET或者RESET)
//例:/* Test if the PLL clock is ready or not */ //FlagStatus Status; //Status = RCC_GetFlagStatus(RCC_FLAG_PLLRDY); //if(Status == RESET) //{ //... //} //else void RCC_ClearFlag(void);// 清除RCC的复位标志位
//(可以清除的复位标志位有:RCC_FLAG_PINRST, RCC_FLAG_PORRST, //RCC_FLAG_SFTRST, RCC_FLAG_IWDGRST, RCC_FLAG_WWDGRST, RCC_FLAG_LPWRRST)
ITStatus RCC_GetITStatus(uint8_t RCC_IT);// 检查指定的RCC中断发生与否
//输入:RCC_IT_LSIRDY,LSI晶振就绪中断;RCC_IT_LSERDY,LSE晶振就绪中断
//RCC_IT_HSIRDY,HSI晶振就绪中断;RCC_IT_HSERDY,HSE晶振就绪中断
//RCC_IT_PLLRDY,PLL就绪中断;RCC_IT_CSS,时钟安全系统中断
//返回值:RCC_IT的新状态
//例:
/* Test if the PLL Ready interrupt has occurred or not */
//ITStatus Status;
//Status = RCC_GetITStatus(RCC_IT_PLLRDY);
//if(Status == RESET)
//{
//...
//}
//else
//{
//...
//}
void RCC_ClearITPendingBit(uint8_t RCC_IT);// 清除RCC的中断待处理位
//RCC_IT_LSIRDY,LSI晶振就绪中断;RCC_IT_LSERDY,LSE晶振就绪中断
//RCC_IT_HSIRDY,HSI晶振就绪中断;RCC_IT_HSERDY,HSE晶振就绪中断
//RCC_IT_PLLRDY,PLL就绪中断;RCC_IT_CSS,时钟安全系统中断 |