Application-specific system clock management to support automatic detection of external oscillator.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
External routines required by main.c file and usbc driver | |
void | sysclk_auto_init (void) |
Detects extern OSC frequency and initialize system clocks on it. More... | |
void | sysclk_auto_enable_usb (void) |
Enable the USB generic clock. More... | |
void | sysclk_auto_disable_usb (void) |
Disable the USB generic clock. More... | |
void sysclk_auto_disable_usb | ( | void | ) |
Disable the USB generic clock.
References scif_gc_setup().
void sysclk_auto_enable_usb | ( | void | ) |
Enable the USB generic clock.
References scif_gc_enable(), and scif_gc_setup().
void sysclk_auto_init | ( | void | ) |
Detects extern OSC frequency and initialize system clocks on it.
References ast_enable(), ast_init_counter(), AST_OSC_RC, AVR32_ENTER_CRITICAL_REGION, AVR32_LEAVE_CRITICAL_REGION, flashcdw_set_flash_waitstate_and_readmode(), freq_detect_start(), u_avr32_scif_oscctrl0_t::oscctrl0, u_avr32_scif_oscctrl0_t::OSCCTRL0, PM_CKSEL_DIVRATIO_4, PM_CLK_SRC_OSC0, PM_CLK_SRC_RC120M, pm_set_clk_domain_div(), pm_set_mclk_source(), scif_enable_osc(), SCIF_OSC0, SCIF_OSC_MODE_2PIN_CRYSTAL, scif_pll0_enable(), scif_pll0_setup(), scif_start_rc120M(), SCIF_UNLOCK, and scif_wait_for_pll0_locked().
Referenced by main().