---- Original Message ---- From: "Digital Systems, Partner" <dsystem@...> To: <lpc2000@yahoogroups.com> Sent: Friday, January 20, 2006 6:42 PM Subject: Re: [lpc2000] Re: changing PLL multiplier on fly - PLLCFG (MSEL) > But there is a bit, PLOCK. I am not very clear about application. > > Can I do as follows? > Disable PLL (Not just switch). I neet to conserve power. And while > enabling again, I check this bit again befor switching to PLL again. I guess you can. Other than the temporary PLL disconnecting, I have only done the normal PLL enabling at startup: SYS->PLLCFG = 0x23; /* P=2, M=4 */ SYS->PLLCON = 0x01; /* Enable PLL */ SYS->PLLFEED = 0xAA; SYS->PLLFEED = 0x55; while (!(SYS->PLLSTAT & 0x400)); /* Wait until PLOCK */ SYS->PLLCON = 0x03; /* Enable and connect PLL */ SYS->PLLFEED = 0xAA; SYS->PLLFEED = 0x55; To conserve power, disconnect and disable PLL, and enter Idle mode as much as possible. Powerdown mode would be better, but only an external interrupt or reset will bring you out of it. When waking up, enable but not yet connect the PLL. According to the datasheet, the PLL takes 100 usec to lock. Don't trust this number, wait until the PLOCK bit is set, which tells that it has locked. While you wait for it to lock, you can continue working at the low clock. If you have nothing useful to do at the low speed, you'll conserve most power by enabling the PLL interrupt so that you get an interrupt when PLOCK is set, and while waiting for the interrupt, you enter Idle mode. When the PLL has locked, your PLL interrupt handler is called, and in that you connect the PLL, and start the real processing. This means that the CPU is idle, not active, during the ~100 usec lock time. Also remember to disable all unused peripherals in PCONP, and don't pull any P1.x pins low (neither by external circuitry, nor by having them as GPIO outputs that are low), as there are permanent internal pull-ups on these pins. Karl Olsen
Message
Re: [lpc2000] Re: changing PLL multiplier on fly - PLLCFG (MSEL)
2006-01-20 by Karl Olsen
Attachments
- No local attachments were found for this message.