diff --git a/src/main.c b/src/main.c index 8129bf2..2479373 100644 --- a/src/main.c +++ b/src/main.c @@ -65,8 +65,7 @@ static void system_clock_init(void) { RCC->CFGR |= (FLASH_ACR_LATENCY_3_WAIT_STATES << FLASH_ACR_LATENCY_BIT); // Use PLL as system clock - RCC->CFGR &= ~(RCC_CFGR_SW_MASK << RCC_CFGR_SW_BIT); - RCC->CFGR |= (RCC_CFGR_SW_PLL << RCC_CFGR_SW_BIT); + RCC->CFGR |= RCC_CFGR_SW(RCC_CFGR_SW_PLL); // Wait indefinitely for PLL clock to be selected // TODO indicate error/timeout somehow?