configure_extosc32k();
enumstatus_code osc32k_status =system_clock_source_enable(SYSTEM_CLOCK_SOURCE_XOSC32K);if(osc32k_status != STATUS_OK) {/* Error enabling the clock source */}
configure_dfll_open_loop();
enumstatus_code dfll_status =system_clock_source_enable(SYSTEM_CLOCK_SOURCE_DFLL);if(dfll_status != STATUS_OK) {/* Error enabling the clock source */}
system_flash_set_waitstates(2);
structsystem_gclk_gen_config config_gclock_gen;system_gclk_gen_get_config_defaults(&config_gclock_gen);config_gclock_gen.source_clock = SYSTEM_CLOCK_SOURCE_DFLL;config_gclock_gen.division_factor = 1;system_gclk_gen_set_config(GCLK_GENERATOR_0, &config_gclock_gen);