AnsweredAssumed Answered

How to put 12 MHz of IRC oscillator into PLL and make 30 MHz CPU operating clock?

Question asked by jun yamada on Mar 13, 2019
Latest reply on Mar 14, 2019 by ZhangJennie

Hi.

I am using LPC 824.
How to put 12 MHz of IRC oscillator into PLL and make 30 MHz CPU operating clock?
In MCUXpresso Config Tools, SYSPLL CLOCK = 24MHz seems to be able to
Can I use 30 MHz with the IRC oscillator?
Thank you.

 

MCUXpresso Config Toolsgenerate code for 24MHz
/*******************************************************************************
* Code for BOARD_BootClockRUN configuration
******************************************************************************/
void BOARD_BootClockRUN(void)
{
/*!< Set up the clock sources */
/*!< Set up IRC */
POWER_DisablePD(kPDRUNCFG_PD_IRC_OUT); /*!< Ensure IRC OUT is on */
POWER_DisablePD(kPDRUNCFG_PD_IRC); /*!< Ensure IRC is on */
CLOCK_Select(kSYSPLL_From_Irc); /*!< set IRC to pll select */
clock_sys_pll_t config;
config.src = kCLOCK_SysPllSrcIrc; /*!< set pll src */
config.targetFreq = 24000000U; /*!< set pll target freq */
CLOCK_InitSystemPll(&config); /*!< set parameters */
CLOCK_SetMainClkSrc(kCLOCK_MainClkSrcIrc); /*!< select irc for main clock */
CLOCK_Select(kCLKOUT_From_Irc); /*!< select IRC for CLKOUT */
CLOCK_SetCoreSysClkDiv(1U);
/*!< Set SystemCoreClock variable. */
SystemCoreClock = BOARD_BOOTCLOCKRUN_CORE_CLOCK;
}

Outcomes