PLL Macros
[PLL Module]

Collaboration diagram for PLL Macros:


Detailed Description

These functions allow to control the PLL.


Defines

#define Is_pll_ready()   (PLLCSR & (1<<PLLOCK) )
 Return 1 if the PLL is ready.
#define Start_pll(frequency)   (PLLCSR = ( (((frequency>>6)&1)<<2) | (1<<1) ) )
 Start the PLL at the parameter frequency (only 64 or 32 MHz).
#define Start_pll_32_mega()   (PLLCSR = 0x02)
 Start the PLL at 32MHz.
#define Start_pll_64_mega()   (PLLCSR = 0x06)
 Start the PLL at 64MHz.
#define Stop_pll()   (PLLCSR = 0x00)
 Stop the PLL.
#define Wait_pll_ready()   while (!(PLLCSR & (1<<PLLOCK)))


Define Documentation

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

Return 1 if the PLL is ready.

Definition at line 33 of file pll_drv.h.

#define Start_pll ( frequency   )     (PLLCSR = ( (((frequency>>6)&1)<<2) | (1<<1) ) )

Start the PLL at the parameter frequency (only 64 or 32 MHz).

Definition at line 31 of file pll_drv.h.

 
#define Start_pll_32_mega (  )     (PLLCSR = 0x02)

Start the PLL at 32MHz.

Definition at line 29 of file pll_drv.h.

Referenced by mc_init_pwm().

 
#define Start_pll_64_mega (  )     (PLLCSR = 0x06)

Start the PLL at 64MHz.

Definition at line 28 of file pll_drv.h.

 
#define Stop_pll (  )     (PLLCSR = 0x00)

Stop the PLL.

Definition at line 35 of file pll_drv.h.

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

Definition at line 34 of file pll_drv.h.

Referenced by mc_init_pwm().


Generated on Wed Jul 12 16:55:31 2006 for Atmel BLDC Sensorless on ATAVRMC100 by  doxygen 1.4.7