Hi there!
I'm trying to run a LPC845 at 30 MHz with an external crystal resonator of value 12 MHz. I try this:
CLOCK_EnableClock(kCLOCK_Iocon);
CLOCK_EnableClock(kCLOCK_Swm);
GPIO_PortInit(GPIO, 0);
GPIO_PortInit(GPIO, 1);
//---------------------------------------------------------------
clock_sys_pll_t pll_config;
pll_config.src = kCLOCK_SysPllSrcExtClk;
pll_config.targetFreq = 30000000;
POWER_DisablePD(kPDRUNCFG_PD_SYSOSC);
CLOCK_InitSysOsc(12000000);
CLOCK_InitSystemPll(&pll_config);
CLOCK_SetCoreSysClkDiv(1);
CLOCK_SetMainClkSrc(kCLOCK_MainClkSrcSysPll);
SystemCoreClock = CLOCK_GetMainClkFreq();
but SystemCoreClock returns 24000000 Hz. If I connect an oscilloscope probe at the XTAL I can see a 12-MHz oscillation, my PLL locks (I can tell because CLOCK_InitSystemPll( ) returns and does not block) but I suspect I still might be running off of the FRO.
I also tried a target frequency of 60 MHz and a division factor of 2 but no luck - then SystemCoreClock is 60000000.
Thank you in advance,
Lubo