Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] Re: changing PLL multiplier on fly - PLLCFG (MSEL)

2006-01-20 by Tom Walsh

Karl Olsen wrote:

>---- 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.
>
>  
>
I am also considering varying the clock to save power, won't this raise 
havoc with the peripherials?  AFAICT, the uart baudrate, timer interrupt 
values, etc., all will have to be reprogrammed to match the new PCLK value?

Regards,

TomW


-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

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.