PLL Macros
[PLL driver Module]

Collaboration diagram for PLL Macros:

These functions allow to control the PLL. More...

Defines

#define PLLx24   ( (0<<PLLP2) | (0<<PLLP1) | (0<<PLLP0) )
#define PLLx12   ( (0<<PLLP2) | (0<<PLLP1) | (1<<PLLP0) )
#define PLLx08   ( (0<<PLLP2) | (1<<PLLP1) | (0<<PLLP0) )
#define PLLx06   ( (0<<PLLP2) | (1<<PLLP1) | (1<<PLLP0) )
#define PLLx04   ( (1<<PLLP2) | (0<<PLLP1) | (0<<PLLP0) )
#define PLLx03   ( (1<<PLLP2) | (0<<PLLP1) | (1<<PLLP0) )
#define PLLx04_8   ( (1<<PLLP2) | (1<<PLLP1) | (0<<PLLP0) )
#define PLLx02   ( (1<<PLLP2) | (1<<PLLP1) | (1<<PLLP0) )
#define Start_pll(clockfactor)   (PLLCSR = ( clockfactor | (1<<PLLE) ))
 Start the PLL at only 48 MHz, regarding CPU frequency Start the USB PLL with clockfactor clockfactor can be PLLx24, PLLx12, PLLx08 PLLx06, PLLx04, PLLx03.
#define Is_pll_ready()   (PLLCSR & (1<<PLOCK) )
 return 1 when PLL locked
#define Wait_pll_ready()   while (!(PLLCSR & (1<<PLOCK)))
 Test PLL lock bit and wait until lock is set.
#define Stop_pll()   (PLLCSR &= (~(1<<PLLE)) )
 Stop the PLL.

Detailed Description

These functions allow to control the PLL.


Define Documentation

#define PLLx24   ( (0<<PLLP2) | (0<<PLLP1) | (0<<PLLP0) )
 

Definition at line 28 of file pll_drv.h.

#define PLLx12   ( (0<<PLLP2) | (0<<PLLP1) | (1<<PLLP0) )
 

Definition at line 29 of file pll_drv.h.

#define PLLx08   ( (0<<PLLP2) | (1<<PLLP1) | (0<<PLLP0) )
 

Definition at line 30 of file pll_drv.h.

#define PLLx06   ( (0<<PLLP2) | (1<<PLLP1) | (1<<PLLP0) )
 

Definition at line 31 of file pll_drv.h.

#define PLLx04   ( (1<<PLLP2) | (0<<PLLP1) | (0<<PLLP0) )
 

Definition at line 32 of file pll_drv.h.

#define PLLx03   ( (1<<PLLP2) | (0<<PLLP1) | (1<<PLLP0) )
 

Definition at line 33 of file pll_drv.h.

#define PLLx04_8   ( (1<<PLLP2) | (1<<PLLP1) | (0<<PLLP0) )
 

Definition at line 34 of file pll_drv.h.

#define PLLx02   ( (1<<PLLP2) | (1<<PLLP1) | (1<<PLLP0) )
 

Definition at line 35 of file pll_drv.h.

#define Start_pll clockfactor   )     (PLLCSR = ( clockfactor | (1<<PLLE) ))
 

Start the PLL at only 48 MHz, regarding CPU frequency Start the USB PLL with clockfactor clockfactor can be PLLx24, PLLx12, PLLx08 PLLx06, PLLx04, PLLx03.

Definition at line 42 of file pll_drv.h.

 
#define Is_pll_ready  )     (PLLCSR & (1<<PLOCK) )
 

return 1 when PLL locked

Definition at line 46 of file pll_drv.h.

 
#define Wait_pll_ready  )     while (!(PLLCSR & (1<<PLOCK)))
 

Test PLL lock bit and wait until lock is set.

Definition at line 49 of file pll_drv.h.

Referenced by usb_general_interrupt(), and usb_start_device().

 
#define Stop_pll  )     (PLLCSR &= (~(1<<PLLE)) )
 

Stop the PLL.

Definition at line 52 of file pll_drv.h.


Generated on Fri Mar 17 16:02:12 2006 for Atmel by  doxygen 1.4.6-NO