Escolar Documentos
Profissional Documentos
Cultura Documentos
The PLL is enabled by software only. The program must configure and
activate the PLL, wait for the PLL to Lock, then connect to the PLL as a
clock source
PLL Registers Description:
PLLCON (PLL Control Register):
PLL Control Register Holding registers for updating PLL control bits.
Values written to this register do not take effect until a valid PLLFEED
sequence has taken place.
Bit Symbol
0
PLLE
PLLC
7:2
Description
PLL Enable. When one, and after a valid PLL feed, this bit will activate
the PLL and allow it to lock to the requested frequency.
PLL Connect. When PLLC and PLLE are both set to one, and after a
valid PLL feed, connects the PLL as the clock source for the
Micro controller. Otherwise, the oscillator clock is used directly by the
microcontroller. See PLLSTAT register
Reserved, user software should not write ones to reserved bits. The
value read from a reserved bit is not defined.
Reset
value
0
0
frequency, and multiplier and divider values are found in the PLL
Frequency Calculation.
PLLCON Register:
Bit Symbol Description
4:0
MSEL
6:5
PSEL
PLL Multiplier value. Supplies the value "M" in the PLL frequency 0
calculations.
PLL Divider value. Supplies the value "P" in the PLL frequency 0
calculations.
Reserved, user software should not write ones to reserved bits. The NA
value read from a reserved bit is not defined.
Reset
Value
0
0
Value of P
1
2
4
8
11110
31
11111
32
Symbol
Description
4:0
MSEL
6:5
PSEL
Read-back for the PLL Multiplier value. This is the value currently
used by the PLL.
Read-back for the PLL Divider value. This is the value currently
Reset
Value
0
0
N/A
0
0
N/A
Symbol
Description
7:0 PLLFEED The PLL feed sequence must be written to this register in order for
PLL configuration and control register changes to take effect.
Description
Reset
Value
0X00
FOSC
FCCO
CCLK
M
P
The PLL output frequency (when the PLL is both active and connected) is
given by:
CCLK = M X FOSC (or) CCLK = FCCO/ (2 X P)
The CCO frequency can be computed as:
FCCO= CCLK X 2 X P or FCCO= FOSC X M X 2 X P
The PLL inputs and settings must meet the following:
FOSC is in the range of 10 MHz to 25 MHz.
CCLK is in the range of 10 MHz to Fmax(the maximum allowed
frequency for the
Micro controller - determined by the system microcontroller is embedded
in).
FCCO is in the range of 156 MHz to 320 MHz.
Procedure for Enabling PLL In ARM 7:
1. Select the Multiplier and divider values to the required frequency
and load those values into PLLCFG Register.
2. Enable the PLL Using PLLCON Register.
3. To update values into PLLCFG Register and PLLCON Send a feed
sequence 0XAA followed by 0X55 into PLLFEED Register.
4. Wait for the PLOCK bit in PLLSTAT Register.
5. Enable and Connect the PLL Using PLLCON Register.
6. To update values into PLLCON Send a feed sequence 0XAA
followed by 0X55 into PLLFEED Register.
7. to Divide the processor Clock to the Required frequency use
VPBDIV Register.
VPBDIV Register(VPBDIV - 0xE01F C100)
Code:
#include <lpc213x.h>
void PLLConfig()
{
PLLCFG=0X00000024;
PLLCON=0X00000001;
PLLFEED=0X000000AA;
PLLFEED=0X00000055;
while(!(PLLSTAT&0X00000400));
PLLCON=0X00000003;
PLLFEED=0X000000AA;
PLLFEED=0X00000055;
}
main()
{
PLLConfig();
while(1);