RCC->PLLI2SCFGR = 0x20003000; #endif /* STM32F40_41xxx || STM32F427_437xx || STM32F429_439xx || STM32F401xx || STM32F411xE || STM32F446xx || STM32F469_479xx */ #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM3...
RCC->PLLI2SCFGR = 0x20003000; #endif /* STM32F40_41xxx || STM32F427_437xx || STM32F429_439xx || STM32F401xx || STM32F411xE || STM32F446xx || STM32F469_479xx */ #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM3...
STM32单片机设置PWM输出完整教程 ,50%方波 源代码: 初始化时钟: //初始化RCC时钟voidinit_rcc(void) { //将外设RCC寄存器重设为缺省值 RCC_DeInit(); //内部晶振使能RCC 2018-11-29 14:21:01 STM32之窗口看门狗RCC时钟配置 ; /* RCC寄存器设置为默认配置 */ RCC_DeInit(); /* 打开外部高速时钟 */...
void RCC_HSE_Configuration(void) { RCC_Deinit(); //将外设RCC寄存器重设为缺省值 RCC_HSEConfig(RCC_HSE_ON); //设置HSE晶振打开 if(RCC_WaitForHSEStartUp() == SUCCESS) // 等待HSE起振,SUCCESS:HSE晶振稳定且就绪 { RCC_HCLKConfig(RCC_SYSCLK_Div1); // 设置AHB时钟(HCLK)RCC_SYSCLK_DIV1:系...
void RCC_DeInit(void) { /*Set HSION bit,内部高速时钟使能HSI振荡器打开*/ RCC->CR |=(uint32_t)0x00000001; /*Reset CFGR register, 31:30--00:选择系统时钟 (SYSCLK) 输出到 MCO2 引脚 27:29--0xx:MCO2 预分频器 (MCO2 prescaler)无分频 ...