CCM_CBCDR = cbcdr; | 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 | while (CCM_CDHIPR & CCM_CDHIPR_PERIPH_CLK_SEL_BUSY) ; // wait | ||||
F_CPU_ACTUAL = frequency; | F_CPU_ACTUAL = frequency; |