Lower clock to 48 Mhz and add thermistor averaging

This commit is contained in:
fruchti 2018-08-04 17:01:00 +02:00
parent be01d51eff
commit 693076e37e
3 changed files with 74 additions and 59 deletions

View file

@ -12,8 +12,8 @@ void SystemInit(void)
FLASH->ACR |= FLASH_ACR_LATENCY_1;
// Set PLL to x9 (-> 72MHz system clock)
RCC->CFGR |= RCC_CFGR_PLLMULL9 | RCC_CFGR_PLLSRC | RCC_CFGR_PPRE1_2;
// Set PLL to x6 (-> 48MHz system clock)
RCC->CFGR |= RCC_CFGR_PLLMULL6 | RCC_CFGR_PLLSRC | RCC_CFGR_PPRE1_2;
// Activate PLL and wait
RCC->CR |= RCC_CR_PLLON;