Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: PLL Setup problems

2005-05-10 by wildhorsemusic

--- In lpc2000@yahoogroups.com, "jase_ko" <jase.ko@g...> wrote:
> Hi, when I try to set up my PLL config with the following code, the 
> program crashes. Is this the correct use of the registers?
> thanks.
> 
> void InitPLL(void)
> {
> 	PLLCFG = 0x00000024;	// set multiplier and divider of PLL 
> to give 60Mhz
> 	PLLCON = 0x00000001;	// Enable the PLL
> 	PLLFEED = 0x000000AA;	// update PLL registers with feed 
> sequence
> 	PLLFEED = 0x00000055;
> 	while(!(PLLSTAT & 0x00000400));	// test lock bit
> 	PLLCON = 0x00000003;	// connect the PLL
> 	PLLFEED = 0x000000AA;	// update PLL registers with feed 
                  0xAA;
> sequence
> 	PLLFEED = 0x00000055;
                  0x55;
> 	VPBDIV = 0x00000002;	// set the VLSI peripheral bus to 
30Mhz
> }
You need to make sure you are using the correct data size, ie: 8bit 
(0xAA), 16bit (0x00FF), etc.  I think you may be confusing your 
address size (32bit) with your data size, which depends on the 
register being accessed.  Remember, PLLSTAT is 16bits, most of the 
others above are 8bit.


Duane

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.