SAM XOSC32K Runtime Failure Detector Application.
Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | ENABLE_XOSC32K_CLOCK_OUT true |
Support and FAQ: visit Microchip Support More... | |
Functions | |
static void | init_osculp32k (void) |
Configures and starts the OSCULP32K internal oscillator. More... | |
static void | init_xosc32k (void) |
Configures and starts the XOSC32K external crystal. More... | |
int | main (void) |
Main application entry point. More... | |
static void | sim_xosc32k_failure (bool connection) |
Simulation xosc32k connect or disconnect. More... | |
#define ENABLE_XOSC32K_CLOCK_OUT true |
Support and FAQ: visit Microchip Support
If true
, the XOSC32K clock will be routed out to GPIO pin
|
static |
Configures and starts the OSCULP32K internal oscillator.
References system_clock_source_enable(), system_clock_source_osculp32k_get_config_defaults(), system_clock_source_osculp32k_set_config(), and SYSTEM_CLOCK_SOURCE_ULP32K.
Referenced by main().
|
static |
Configures and starts the XOSC32K external crystal.
References CONF_CLOCK_PIN_MUX, CONF_CLOCK_PIN_OUT, system_pinmux_config::direction, system_clock_source_xosc32k_config::enable_clock_failure_detector, system_pinmux_config::mux_position, system_clock_source_xosc32k_config::on_demand, system_clock_source_enable(), system_clock_source_is_ready(), SYSTEM_CLOCK_SOURCE_XOSC32K, system_clock_source_xosc32k_get_config_defaults(), system_clock_source_xosc32k_set_config(), system_pinmux_get_config_defaults(), SYSTEM_PINMUX_PIN_DIR_OUTPUT, and system_pinmux_pin_set_config().
Referenced by main().
int main | ( | void | ) |
Main application entry point.
References BUTTON_0_INACTIVE, BUTTON_0_PIN, init_osculp32k(), init_xosc32k(), LED_0_ACTIVE, LED_0_INACTIVE, LED_0_PIN, port_pin_get_input_level(), port_pin_set_output_level(), sim_xosc32k_failure(), system_flash_set_waitstates(), and system_init().
|
static |
Simulation xosc32k connect or disconnect.
Simulation xosc32k connect or disconnect
[in] | connection | true represent xosc32k is connected |
References system_clock_source_is_ready(), and SYSTEM_CLOCK_SOURCE_XOSC32K.
Referenced by main().