Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RCC->CR|=RCC_CR_HSEON;
- while(!(RCC->CR&RCC_CR_HSERDY)){}; //wait for HSE
- RCC->PLLCFGR|= RCC_PLLCFGR_PLLSRC_HSE; //PLL source = HSE
- RCC->PLLCFGR&= ~RCC_PLLCFGR_PLLM; //clear PLLM
- RCC->PLLCFGR|= RCC_PLLCFGR_PLLM_3; //PLLM = 8
- RCC->PLLCFGR&= ~RCC_PLLCFGR_PLLN; //reset value 192 tak chto obnulyaem
- RCC->PLLCFGR|= RCC_PLLCFGR_PLLN_3|RCC_PLLCFGR_PLLN_5|RCC_PLLCFGR_PLLN_6|RCC_PLLCFGR_PLLN_7; //PLLN = 232
- RCC->PLLCFGR&= ~RCC_PLLCFGR_PLLP; //PLLP = 2 (is reset value 0x00)
- RCC->CR|=RCC_CR_PLLON;
- while(!(RCC->CR&RCC_CR_PLLRDY)){};
- RCC->CFGR &=~RCC_CFGR_SW;
- RCC->CFGR|=RCC_CFGR_SW_PLL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement