pm_example.c File Reference

#include <avr32/io.h>
#include "pm.h"

Include dependency graph for pm_example.c:

Go to the source code of this file.

Functions

int main (void)


Function Documentation

int main ( void   ) 

Definition at line 4 of file pm_example.c.

References PM_OSC0, PM_PLL0, pm_set_mclk_source(), and pm_set_pll().

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 }

Here is the call graph for this function:


Generated on Thu May 10 14:14:49 2007 for AVR321000 Communication with the AVR32 USART by  doxygen 1.5.1