SAM Clock Driver.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | system_clock_source_dfll_config |
Configuration structure for DFLL. More... | |
struct | system_clock_source_osc32k_config |
Configuration structure for OSC32K. More... | |
struct | system_clock_source_osc8m_config |
Configuration structure for OSC8M. 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... | |
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... | |
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 8MHz Oscillator Management | |
static void | system_clock_source_osc8m_get_config_defaults (struct system_clock_source_osc8m_config *const config) |
Retrieve the default configuration for OSC8M. More... | |
void | system_clock_source_osc8m_set_config (struct system_clock_source_osc8m_config *const config) |
Configure the internal OSC8M oscillator clock source. More... | |
Internal DFLL Management | |
static void | system_clock_source_dfll_get_config_defaults (struct system_clock_source_dfll_config *const config) |
Retrieve the default configuration for DFLL. More... | |
void | system_clock_source_dfll_set_config (struct system_clock_source_dfll_config *const config) |
Configure the DFLL 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... | |
static enum status_code | system_apb_clock_set_divider (const enum system_clock_apb_bus bus, const enum system_main_clock_div divider) |
Set APBx clock divider. More... | |
static uint32_t | system_apb_clock_get_hz (const enum system_clock_apb_bus bus) |
Retrieves the current frequency of a ABPx. 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... | |
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... | |