/* \brief This is an example that shows how to do the following: * - start the RC120M RC Osc * - switch the main clock to RC120M/4 * - set-up a generic clock with the RC120M RC Osc as a source * - output a generic clock to : * - GCLK_1_0(STK600_RCUC3L0 & AT32UC3L-EK) * - GCLK_0 (STK600_RCUC3D) */ int main(void) { // Start RC120M, switch main clock to RC120M/4. local_set_main_clock_to_rc120m(); /* Set-up a generic clock from a high frequency clock and output it to a gpio pin. */ local_start_gc(); /* Now toggle LED0 using a GPIO */ while(1) { gpio_tgl_gpio_pin(LED0_GPIO); software_delay(); } }
/* \brief This is an example that shows how to do the following: * - start a high frequency clock * - switch the main clock to that high frequency clock * - set-up a generic clock with a high frequency clock as a source * - output a generic clock to GCLK_0_1(EVK1100) / GCLK_2_1 / GCLK_2(EVK1101) / * GCLK_1_0(EVK1104) / GCLK_0_2(UC3C_EK) / GCLK_1_0(STK600_RCUC3L0 & AT32UC3L-EK) * */ int main(void) { /* Start a high frequency clock and switch the main clock to that high frequency clock */ local_start_highfreq_clock(); /* Set-up a generic clock from a high frequency clock and output it to a gpio pin. */ local_start_gc(); /* Now toggle LED0 using a GPIO */ while(1) { gpio_tgl_gpio_pin(LED0_GPIO); software_delay(); } }