how to program a PLL

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to program a PLL

1,324 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kevin on Fri Feb 01 03:58:02 MST 2013
how do I program a PLL using the LPC1768
0 Kudos
Reply
4 Replies

1,254 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Fri Feb 01 06:40:20 MST 2013
Have a look at this code, it contains my routines to program the PLL on the fly.
There are 3 tables with different PLL settings for a 12 MHz xtal, internal oscillator and even for the RTC osc. (although I never actually use this).

Using this code you can switch oscillators and PLL settings on the fly in your own program. I use this in a number of projects to switch to a lower frequency when idling and to enable PLL1 to generate the USB clock.

Works like a charm (but then, we can't all be wizards ;))

Rob
0 Kudos
Reply

1,254 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Feb 01 05:08:58 MST 2013
No. I'm using CMSIS. As mentioned above system_LPC17xx.c is including PLL formula and also PLL setup in SystemInit :eek:

//   <e3> PLL0 Configuration (Main PLL)
//     <h> PLL0 Configuration Register (PLL0CFG)
//                     <i> F_cco0 = (2 * M * F_in) / N
//                     <i> F_in must be in the range of 32 kHz to 50 MHz
//                     <i> F_cco0 must be in the range of 275 MHz to 550 MHz
//       <o4.0..14>  MSEL: PLL Multiplier Selection
//                     <6-32768><#-1>
//                     <i> M Value
//       <o4.16..23> NSEL: PLL Divider Selection
//                     <1-256><#-1>
//                     <i> N Value
//     </h>
//   </e>
0 Kudos
Reply

1,254 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kevin on Fri Feb 01 04:12:35 MST 2013
You do not have any examples of how to program the PLL
0 Kudos
Reply

1,254 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Feb 01 04:02:47 MST 2013
#1 As described in UM10360 ;)

#2 As shown in CMSIS: system_LPC17xx.c :)

#3 Try a forum search :eek: This issue has been discussed here several times for LPC1768 and LPC1769 :)
0 Kudos
Reply