SAM C2x Clock Driver.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | system_clock_source_dpll_config |
Configuration structure for DPLL. More... | |
struct | system_clock_source_osc32k_config |
Configuration structure for OSCULP32K. More... | |
struct | system_clock_source_osc48m_config |
Configuration structure for OSC48M. More... | |
struct | system_clock_source_osculp32k_config |
Configuration structure for OSCULP32K. More... | |
struct | system_clock_source_xosc32k_config |
Configuration structure for XOSC32K. More... | |
struct | system_clock_source_xosc_config |
Configuration structure for XOSC. More... | |
Functions | |
External Oscillator Management | |
static void | system_clock_source_xosc_get_config_defaults (struct system_clock_source_xosc_config *const config) |
Retrieve the default configuration for XOSC. More... | |
void | system_clock_source_xosc_set_config (struct system_clock_source_xosc_config *const config) |
Configure the external oscillator clock source. More... | |
static bool | system_clock_xosc_clock_failure_detected (void) |
Checks if XOSC clock failure detected. More... | |
static bool | system_clock_xosc_is_switched (void) |
Checks if XOSC is switched and provides the safe clock. More... | |
External 32KHz Oscillator Management | |
static void | system_clock_source_xosc32k_get_config_defaults (struct system_clock_source_xosc32k_config *const config) |
Retrieve the default configuration for XOSC32K. More... | |
void | system_clock_source_xosc32k_set_config (struct system_clock_source_xosc32k_config *const config) |
Configure the XOSC32K external 32KHz oscillator clock source. More... | |
static bool | system_clock_xosc32k_clock_failure_detected (void) |
Checks if XOSC32K clock failure detected. More... | |
static bool | system_clock_xosc32k_is_switched (void) |
Checks if XOSC32K is switched and provides the safe clock. More... | |
Internal 32KHz Oscillator Management | |
static void | system_clock_source_osc32k_get_config_defaults (struct system_clock_source_osc32k_config *const config) |
Retrieve the default configuration for OSC32K. More... | |
void | system_clock_source_osc32k_set_config (struct system_clock_source_osc32k_config *const config) |
Configure the internal OSC32K oscillator clock source. More... | |
Internal Ultra Low Power 32KHz Oscillator management | |
static void | system_clock_source_osculp32k_get_config_defaults (struct system_clock_source_osculp32k_config *const config) |
Retrieve the default configuration for OSCULP32K. More... | |
void | system_clock_source_osculp32k_set_config (struct system_clock_source_osculp32k_config *const config) |
Configure the internal OSCULP32K oscillator clock source. More... | |
Internal 48MHz Oscillator Management | |
static void | system_clock_source_osc48m_get_config_defaults (struct system_clock_source_osc48m_config *const config) |
Retrieve the default configuration for OSC48M. More... | |
void | system_clock_source_osc48m_set_config (struct system_clock_source_osc48m_config *const config) |
Configure the internal OSC48M oscillator clock source. More... | |
Clock Source Management | |
enum status_code | system_clock_source_write_calibration (const enum system_clock_source system_clock_source, const uint16_t calibration_value, const uint8_t freq_range) |
enum status_code | system_clock_source_enable (const enum system_clock_source system_clock_source) |
enum status_code | system_clock_source_disable (const enum system_clock_source clk_source) |
Disables a clock source. More... | |
bool | system_clock_source_is_ready (const enum system_clock_source clk_source) |
Checks if a clock source is ready. More... | |
uint32_t | system_clock_source_get_hz (const enum system_clock_source clk_source) |
Retrieve the frequency of a clock source. More... | |
Main Clock Management | |
static void | system_cpu_clock_set_divider (const enum system_main_clock_div divider) |
Set main CPU clock divider. More... | |
static uint32_t | system_cpu_clock_get_hz (void) |
Retrieves the current frequency of the CPU core. More... | |
Bus Clock Masking | |
static void | system_ahb_clock_set_mask (const uint32_t ahb_mask) |
Set bits in the clock mask for the AHB bus. More... | |
static void | system_ahb_clock_clear_mask (const uint32_t ahb_mask) |
Clear bits in the clock mask for the AHB bus. More... | |
static enum status_code | system_apb_clock_set_mask (const enum system_clock_apb_bus bus, const uint32_t mask) |
Set bits in the clock mask for an APBx bus. More... | |
static enum status_code | system_apb_clock_clear_mask (const enum system_clock_apb_bus bus, const uint32_t mask) |
Clear bits in the clock mask for an APBx bus. More... | |
Internal DPLL Management | |
static void | system_clock_source_dpll_get_config_defaults (struct system_clock_source_dpll_config *const config) |
Retrieve the default configuration for DPLL. More... | |
void | system_clock_source_dpll_set_config (struct system_clock_source_dpll_config *const config) |
Configure the DPLL clock source. More... | |
System Clock Initialization | |
void | system_clock_init (void) |
Initialize clock system based on the configuration in conf_clocks.h. More... | |
System Flash Wait States | |
static void | system_flash_set_waitstates (uint8_t wait_states) |
Set flash controller wait states. More... | |