The author has 1 post.
Font size: Small - 100% (Default)  Content converter: No conversion
 
Clicks Replies
1280 0
【方法】系统时钟从PLL切换到HSI(以及切换回来)
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 1 Posted at: 4/7/17 21:36
【PLL到HSI】
// 假设HSI已经打开
RCC->CFGR &= ~RCC_CFGR_SW; // 系统时钟切换到HSI
RCC->CR &= ~(RCC_CR_PLLON | RCC_CR_HSEON); // 关闭PLL和HSE
【HSI到PLL】
RCC->CR |= RCC_CR_PLLON | RCC_CR_HSEON; // 打开PLL和HSE
RCC->CFGR |= RCC_CFGR_SW_1; // 系统时钟切换到PLL
while ((RCC->CFGR & RCC_CFGR_SWS) != RCC_CFGR_SWS_1); // 等待切换完毕
Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 1280 Replies: 0
Author: 巨大八爪鱼
Last reply: 巨大八爪鱼
Last reply time: 4/7/17 21:36
Announcements