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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
1,303件の閲覧回数
jun1
Contributor V

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;
}

ラベル(2)
0 件の賞賛
返信
1 解決策
1,070件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi jun yamada ,

With 12 MHz of IRC oscillator as input, It's not possible to set SYSPLL_CLOCK as 30M, because in LPC824 PLL, N_DIV value can not be set, it is locked as 1.

SYSPLL_CLOCK = clockin * M

so with clockin as 12M, we can only get SYSPLL_CLOCK as 12,24,36,48,60... ...

However, we can take use of SYSAHBCLKDIV to set system clock as 30M. see below:

system clock = clockin * M/SYSAHBCLKDIV = 12M * 5 / 2 =30M

pastedImage_1.png

This is very useful PLL configuration examples. I extracted from user manual for your reference.

pastedImage_1.png

For more information about LPC824 PLL, see LPC824 user manual, 5.7.4 System PLL functional description.


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

元の投稿で解決策を見る

3 返答(返信)
1,071件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi jun yamada ,

With 12 MHz of IRC oscillator as input, It's not possible to set SYSPLL_CLOCK as 30M, because in LPC824 PLL, N_DIV value can not be set, it is locked as 1.

SYSPLL_CLOCK = clockin * M

so with clockin as 12M, we can only get SYSPLL_CLOCK as 12,24,36,48,60... ...

However, we can take use of SYSAHBCLKDIV to set system clock as 30M. see below:

system clock = clockin * M/SYSAHBCLKDIV = 12M * 5 / 2 =30M

pastedImage_1.png

This is very useful PLL configuration examples. I extracted from user manual for your reference.

pastedImage_1.png

For more information about LPC824 PLL, see LPC824 user manual, 5.7.4 System PLL functional description.


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

1,070件の閲覧回数
jun1
Contributor V

OK.
You can do this with the MCUXpresso Config Tools.
I'll try.
Thank you very much.

0 件の賞賛
返信
1,070件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

You are welcome!

0 件の賞賛
返信