@@ -153,8 +153,9 @@ uint32_t set_arm_clock(uint32_t frequency) | |||
CCM_CBCDR = cbcdr; | |||
} | |||
cbcdr &= ~CCM_CBCDR_PERIPH_CLK_SEL; | |||
CCM_CBCDR = cbcdr; | |||
//cbcdr &= ~CCM_CBCDR_PERIPH_CLK_SEL; | |||
//CCM_CBCDR = cbcdr; // why does this not work at 24 MHz? | |||
CCM_CBCDR &= ~CCM_CBCDR_PERIPH_CLK_SEL; | |||
while (CCM_CDHIPR & CCM_CDHIPR_PERIPH_CLK_SEL_BUSY) ; // wait | |||
F_CPU_ACTUAL = frequency; |