PLL configuration

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

PLL configuration

3,013件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Linas on Thu Mar 07 02:54:33 MST 2013
Hi,


I would like to dinamically change PLL clock in the LPC17xx MCU. During the program flow I would like to
reduce clock from 80 MHz to 30 MHz. Is it safe? Maybe someone had a similar task.


Best,

Linas
ラベル(1)
0 件の賞賛
返信
5 返答(返信)

2,795件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Linas on Tue Mar 12 01:08:17 MST 2013
But I noticed one thing regarding changing CPU divider.

LPC_SC->CCLKCFG   = CCLKCFG_Val;      /* Setup Clock Divider                */
  /* Periphral clock must be selected before PLL0 enabling and connecting */

So, in case LPC1778 I want to change dynamically CPU clock divider I need to disable and disconnect PLL. Can I change
CPU divider without disabling PLL during application runtime?

Linas
0 件の賞賛
返信

2,795件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Linas on Fri Mar 08 05:29:30 MST 2013
Oh yes I see that LPC1778 peripheral gets clock from the PLL. So, in case of LPC1778 I can configure CPU divider dynamically. Are there any special sequence to do that?


Best,

Linas
0 件の賞賛
返信

2,795件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Linas on Fri Mar 08 05:23:53 MST 2013
Yes I am using PLL to drive CPU and peripherals clock. So, if I will change CPU divider, do I need to re-setup peripherals?

Yes I am going to use LPC1778. For now I am working with LPC1756.


Best,


Linas
0 件の賞賛
返信

2,795件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Thu Mar 07 10:02:00 MST 2013
Are you using the PLL to drive the system clock (base clock for CPU divider and peripherals)? And are you using the 175x/6x or 177x/8x family?

Changing the PLL while the system is actively using it isn't something I would recommend. It might work, but changing the PLL rate usually has some delay involved and can stall or cause problems with devices that use that clock (for example,

If you really need to change the PLL rate, it's best to switch the system clock to a safe clock (main oscillator or IRC), then adjust the PLL and wait for PLL lock, and then switch the system clock back to the PLL. Because the PLL rate changed, any peripherals you use will need to be re-setup for the new clock.

A better alternative would be to keep the PLL clock rate at 80MHz and adjust the CPU clock divider. It won't get you an exact 30MHz, but you can easily get 40MHz or 26.67MHz. You can also trying bumping up the PLL rate to 120MHz and using CPU dividers of 2 and 4 for fast switching between 60Mhz and 30MHz. For the 175x/6x family, the peripheral clock rate is based on the CPU rate and it's divider, while the 177x/8x peripheral clock is based directly on the system clock (ie, PLL out) and isn't altered by the CPU divider.
0 件の賞賛
返信

2,580件の閲覧回数
NaserKshirsagar
Contributor I

About updating PLL clock:

1. Does stalling or hanging of controller will happen if we initialize PLL twice? I mean, if code call PLL_Init function twice what will happen?

0 件の賞賛
返信