Clocking the MK20FX512 with Processor Expert?

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

Clocking the MK20FX512 with Processor Expert?

Jump to solution
767 Views
simonhaines
Contributor III

I'm trying to clock a Kinetis MK20FX512 at 96MHz core clock speed and 48MHz bus speed with Processor Expert. I have a 32.768kHz crystal attached to XTAL32/EXTAL32 (with nothing on XTAL0/EXTAL0 and XTAL1/EXTAL1) and I am able to set the following configuration manually in code:

  • RTC OSCE 32.768 kHz oscillator is enabled
  • SIM OSC32KSEL RTC oscillator selected as 32kHz clock source (ERCLK32K)
  • SIM PLLFLLSEL MCGFLLCLK selected for various peripheral clocking options
  • SIM OUTDIV1 Sys: /1
  • SIM OUTDIV2 Bus: /2
  • OSC0 ERCLKEN External reference clock enabled
  • OSC1 ERCLKEN External reference clock enabled
  • MCG OSCSEL 32kHz RTC oscillator selected as FLL external reference clock
  • MCG RANGE0 Low frequency range selected for crystal oscillator
  • MCG HGO0 High gain oscillator configured for low-power operation
  • MCG EREFS0 External reference clock selected (not oscillator) as EREF source
  • MCG IRCS Slow internal reference clock selected (instead of fast IREF)
  • MCG CLKS Output of FLL selected as clock source
  • MCG FRDIV /1 divider for external reference clock (OSCSEL has reset value of 0)
  • MCG IREFS External reference clock selected as source for the FLL
  • MCG IRCLKEN Internal reference clock is enabled
  • MCG IREFSTEN Internal reference clock is disabled in stop mode
  • MCG DMX32 DRST_DRS DCO range is 96MHz

This produces the desired core clock speed of 96MHz and bus speed of 48MHz. Using processor expert, I can't select XTAL32/EXTAL32 as the clock source for the RTC (only RTC_CLKIN is available) or the DMX32 and DRST_DRS values to get the clock to 96MHz. The highest value seems to be 47.972352MHz. Is this a problem with my configuration or with Processor Expert?

1 Solution
371 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Simon Haines:

Please let us know the version of Processor Expert or the IDE version that you are using (Codewarrior or Kinetis Design Studio).

Are you sure you selected K20FX512 from the New Project Wizard?

This device does not have any RTC_CLKIN pin, only the XTAL32/EXTAL32 pins for the crystal.

Using KDS v3.1.0 I do not have any issues to set your required configuration, see below:

pastedImage_0.png

Regards!

Jorge Gonzalez

View solution in original post

2 Replies
372 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Simon Haines:

Please let us know the version of Processor Expert or the IDE version that you are using (Codewarrior or Kinetis Design Studio).

Are you sure you selected K20FX512 from the New Project Wizard?

This device does not have any RTC_CLKIN pin, only the XTAL32/EXTAL32 pins for the crystal.

Using KDS v3.1.0 I do not have any issues to set your required configuration, see below:

pastedImage_0.png

Regards!

Jorge Gonzalez

371 Views
simonhaines
Contributor III

Thanks Jorge, double-checking my setup shows I had indeed selected the wrong chip (off by one error ha ha). Thanks for taking the time to reply.

0 Kudos