Inconsistency in LPCOpen sysinit_15xx.c

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

Inconsistency in LPCOpen sysinit_15xx.c

420 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by miccio on Thu Sep 17 11:19:21 MST 2015
Hello everyone,

I wanted to write my own set of libraries so I looked into the LPCOpen file mentioned in the title and found this:
/* Setup PLL for main oscillator rate (FCLKIN = 12MHz) * 6 = 72MHz
   MSEL = 5 (this is pre-decremented), PSEL = 1 (for P = 2)
   FCLKOUT = FCLKIN * (MSEL + 1) = 12MHz * 6 = 72MHz
   FCCO = FCLKOUT * 2 * P = 72MHz * 2 * 2 = 288MHz (within FCCO range) */
Chip_Clock_SetupSystemPLL(5, 2);


However, the given values of MSEL and PSEL yield M=6, P=4, which result in a FCCO freq. of 562MHz (therefore beyond its boundaries) for input freq of 12MHz, regardless of it being sourced from the IRC or the XTAL.
That is, according to UM10736 page76, which actually suggests MSEL and PSEL values of 5 and 1 respectively.

How can the library functions work if their settings are wrong?
Labels (1)
0 Kudos
1 Reply

393 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Sep 17 11:39:06 MST 2015
That's a known issue  :((

https://www.lpcware.com/content/forum/bugreport-lpcopen-208c-lpc15xx-configures-pll-incorrectly
0 Kudos