29 CKGR_MOR = (CKGR_MOR & ~CKGR_MOR_MOSCXTST_MASK) |
30 CKGR_MOR_KEY | CKGR_MOR_MOSCXTEN |
32 while (!(PMC_SR & PMC_SR_MOSCXTS));
34 CKGR_MOR = CKGR_MOR_KEY | (CKGR_MOR & ~CKGR_MOR_MOSCXTEN);
40 CKGR_PLLAR = CKGR_PLLAR_ONE | ((mul - 1) << 16) |
41 CKGR_PLLAR_PLLACOUNT_MASK | div;
42 while (!(PMC_SR & PMC_SR_LOCKA));
51 PMC_PCER1 = 1 << (pid & 31);
65 PMC_PCDR1 = 1 << (pid & 31);
74 PMC_MCKR = (PMC_MCKR & ~PMC_MCKR_CSS_MASK) | src;
75 while (!(PMC_SR & PMC_SR_MCKRDY));
85 CKGR_MOR |= CKGR_MOR_KEY | CKGR_MOR_MOSCSEL;
98 CKGR_MOR = CKGR_MOR_KEY |
99 (CKGR_MOR & ~(CKGR_MOR_MOSCSEL | CKGR_MOR_MOSCRCF_MASK));
static void eefc_set_latency(uint8_t wait)
void pmc_clock_setup_in_rc_4mhz_out_84mhz(void)
void pmc_xtal_enable(bool en, uint8_t startup_time)
void pmc_peripheral_clock_enable(uint8_t pid)
uint32_t pmc_mck_frequency
Default peripheral clock frequency after reset.
void pmc_clock_setup_in_xtal_12mhz_out_84mhz(void)
void pmc_peripheral_clock_disable(uint8_t pid)
void pmc_plla_config(uint8_t mul, uint8_t div)
void pmc_mck_set_source(enum mck_src src)