00001 #include <avr32/io.h> 00002 #include "pm.h" 00003 00004 int main( void ) 00005 { 00006 /* you are by default running at 20MHz */ 00007 00008 /* 00009 Setup the PLL0 with a the following frequency 00010 00011 MULTIPLIER 00012 PLL_f =------------ * OSCILLATOR_f 00013 DIVIDER 00014 */ 00015 pll_opt.oscillator=PM_OSC0; 00016 pll_opt.pll=PM_PLL0; 00017 pll_opt.multiplier=2; 00018 pll_opt.divider=1; 00019 00020 /* Apply the changes */ 00021 pm_set_pll(&pll_opt); 00022 00023 /*Set the frequency to mclk */ 00024 pm_set_mclk_source(PM_PLL0); 00025 00026 /* You are now running at 40 Mhz! */ 00027 00028 return 0; 00029 }
1.5.1