MK64FX512 clock setup

Showing results for 
Search instead for 
Did you mean: 

MK64FX512 clock setup

Contributor I


On a new board I am trying to get the clock configured on the MK64X512xxx12.

I started from a FRDM-K64F project - I have such a board as well - and then tried to move the project to my new board.

When stepping through the code, it seems to get stuck on the clock configuration. So I figured, ok, clocks on my hardware is different, so I just need to change the clock configuration to match my hardware.

I tried to use the clock tool on MCUXpresso to generate the proper code, but it allways seems to get stuck in the function 


and always when calling 


I tried to use the internal 48 MHz clock, the external crystal oscillator (my board has a 16 MHz crystal connected between the EXTAL0 and XTAL0 pins), but nothing seems to work.

However, if I just skip the clock configuration and take the default power on reset values, then my example does work, but then I have a clock of about 20 MHz, while I would like to run it on 120 MHz.

Any ideas?

0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

Hi Wim,

Have you try to select 'Using oscillator with external crystal(low power)' as OSC mode?

16MHz K64.png
I have attached the file generated by online MCUXpresso clock tool, so that you can test it on the custom board.

Best Regards,



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

0 Kudos