FRDM-K22F clock options

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

FRDM-K22F clock options

跳至解决方案
1,032 次查看
coopertrooper
Contributor III

Hello everyone,

I have a couple of questions regarding the main clock that is used in the FRDM-K22F eval board.

1) If my understanding is correct, does the K22F work out of an internal 120MHz clock?

2) If the device works out of an internal clock, is it possible to configure the device to work from an external clock?

I have read the documentation, but it is not fully clear to me.

Thank you very much.

0 项奖励
1 解答
716 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Christian,

K22F not only can use internal clock, but also can use external clock.

And  through configuration related clock register to get the core clock 、bus clock and so no.

You can refer to here (it in the Reference manual  p156) :

pastedImage_0.png

And the detail you can refer to the "Chapter 5 Clock Distribution"


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
4 回复数
716 次查看
coopertrooper
Contributor III

Thank you very much, this is what I wanted.

0 项奖励
716 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Christian,

1)  Please see here :

pastedImage_0.png

the core clock is   MCGOUTCLK divided by OUTDIV1 clocks (the SIM_CLKCIV1 register).  (About the clock definitios please see the 5.4 Clock definitions of Reference Manual  ).

About the clock regiseter cofiguration , need configuration MCG and SIM.

2) Yes,( i have not configuration CLOCK use KSDK, i only check the SDK API RM  )

3) NO, EXTAL32 and XTAL32 only can use 32,768KHZ crystal.

  while the EXTAL0 pin can use a signal generator .

BR

Alice

0 项奖励
717 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Christian,

K22F not only can use internal clock, but also can use external clock.

And  through configuration related clock register to get the core clock 、bus clock and so no.

You can refer to here (it in the Reference manual  p156) :

pastedImage_0.png

And the detail you can refer to the "Chapter 5 Clock Distribution"


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
716 次查看
coopertrooper
Contributor III

Just a follow up on this question.

I am trying to use the xTAL32 32 KHz signal as an experiment to run the MCU. Now I noticed on the documentation that the clock specified to run the ARM coretex-M4 core is named "Core clock".

After that, there is no mention of a "Core Clock".

Question 1) Is the "core clock" the same as the MCGOUTCLK? The Diagram you sent me seems to indicate this is true.

Question 2) The documentation only differentiates between output of FLL/PLLCS, Internal ref clk (I assume 4MHz/32KHz), and External. However, the picture you sent shows 2 external clocks, a "System Oscillator", an "RTC Oscillator", and an IRC48M internal(?) oscillator.

I am assuming that all I need is to add the following line of code?

CLOCK_HAL_SetClkSrcMode(MCG_BASE,kMcgClkSelExternal);

CLOCK_HAL_SetExternalRefSel0Mode(MCG_BASE,kMcgExternalRefClkSelOsc);

and this is enough to get the device to work on the EXTAL32 clock signal?

Question 3) Can I connect a signal generator to the EXTAL32 and leave XTAL32 floating instead of using a crystal?

0 项奖励