FRDM-K22F clock options

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FRDM-K22F clock options

Jump to solution
936 Views
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 Kudos
1 Solution
620 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
620 Views
coopertrooper
Contributor III

Thank you very much, this is what I wanted.

0 Kudos
620 Views
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 Kudos
621 Views
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 Kudos
620 Views
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 Kudos