ARM : Example Setting PLL for LPC2148

For programming PLL we need to follow some sequence and then only our new PLL settings will be effective. First write multiplier M and divider P values respectively to PLLCFG register. Since M and P values can have only specific values then there is a look up table used to determine PLLCFG bits is as follows:













TakeLPC2148 as an example case.

Now considerthe oscillator frequency (Fosc) as 12 MHz, then this register value become:


Here the relation between Fosc, CCLK and M is CCLK = M x Fosc . So, based on this we call M as multiplier. Mathematically (functionally) it is true but technically, it is not.

And then, Fccowill be maintained by using constant P value.

Fcco = CCLK * 2 * P

For this case, CCLK=60.

So, Fcco= 60 * 2 * P

= 120 * P

To maintain this value in the range of 156MHz to 320 MHz, you need to take P value as 2.

Therefore, Fcco= 240MHz.

Now, if you summarize all these points,

M = 5, P =2   =>   PLLCFG = 0x24 (010 0100).

Coming to coding part:

We need to follow the below sequential steps to set the PLL:

  • Set the configure register bits CFG and CON.
  • As a security measure, the PLL must be “fed” with “magic” values. This makes the CCO running, and the feedback path and the detector will tune it.It takes some time before the PLL is stable (“locked”).
  • Wait for lock into the new frequency.
  • Connect the PLL
  • Again security measure: feed

In next page we will try and put all this in a program. Next Page

Related posts:

About author

This article was written by admin

Admin has over twenty years experience in the electronics industry, largely dedicated to embedded software. A frequent presenter at conferences and seminars and author of numerous technical articles. Working presently as Development Manager in India. A firm Believer in Knowledge grows when it shared.


Comments (6)
  1. sukumaran says - Posted: April 8, 2013

    hi sir,, is baud rate correct?

  2. admin says - Posted: April 9, 2013

    Hi my friend ….where did you find baud rate? can you be please more specific about it?

  3. ankush says - Posted: September 26, 2013

    sir please send me your mail id…

  4. ankush says - Posted: September 26, 2013

    send me basic program of arm7 in c

  5. Ambuj Maurya says - Posted: December 25, 2015

    Hello, Sir will u help me out in interfacing M45PE16 with ARM LPC2148

  6. bhavesh says - Posted: April 20, 2016

    sir please explain me step 3 of the above program. why do we use (PLL0STAT & (1<<10)) and then && with loop_ctr. please explain in etail

Leave your comment

Your email address will not be published. Required fields are marked *