--- 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.
DuaneMessage
Re: PLL Setup problems
2005-05-10 by wildhorsemusic
Attachments
- No local attachments were found for this message.