PLL Macros
[PLL driver Module]

Collaboration diagram for PLL Macros:

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

Defines

#define PLLx06   ( (0<<PLLP2) | (0<<PLLP1) | (0<<PLLP0) )
#define PLLx03   ( (0<<PLLP2) | (0<<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)),PLLCSR=0 )
 Stop the PLL.

Detailed Description

These functions allow to control the PLL.


Define Documentation

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

Definition at line 55 of file pll_drv.h.

Referenced by usb_autobaud().

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

Definition at line 56 of file pll_drv.h.

Referenced by usb_autobaud().

#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 63 of file pll_drv.h.

Referenced by usb_autobaud().

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

return 1 when PLL locked

Definition at line 67 of file pll_drv.h.

Referenced by usb_general_interrupt(), and usb_generate_remote_wakeup().

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

Test PLL lock bit and wait until lock is set.

Definition at line 70 of file pll_drv.h.

Referenced by usb_general_interrupt(), usb_generate_remote_wakeup(), and usb_start_device().

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

Stop the PLL.

Definition at line 73 of file pll_drv.h.

Referenced by usb_device_task(), and usb_general_interrupt().


Generated on Mon May 5 15:58:22 2008 for ATMEL by  doxygen 1.5.1-p1