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
解決済! 解決策の投稿を見る。
Hello Lubomir Bogdanov ,
From the User Manual of LPC845, we can know:
Fclkout = M * Fclkin
In you case, Fclkin = 12MHZ,
M = MSEL +1,
MSEL:
and FCLKOUT must be lower than 30 MHz.
So in your case, the the max of Fclkout is 24MHZ, and the system clock is 24MHZ, can't 30MHZ.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hello Lubomir Bogdanov ,
From the User Manual of LPC845, we can know:
Fclkout = M * Fclkin
In you case, Fclkin = 12MHZ,
M = MSEL +1,
MSEL:
and FCLKOUT must be lower than 30 MHz.
So in your case, the the max of Fclkout is 24MHZ, and the system clock is 24MHZ, can't 30MHZ.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------