I am using the KL25Z on the FRDM board. The clock is running at the default frequency of 20.97MHz. Is there is an easy way to change it to 48MHz? I see there is a function SystemCoreClockUpdate() and there are also macro definition for the MCG_MODE with MCG_MODE_FBI the one I need.
However, I cannot find (or understand) documentation on how to use these definitions.
Thanks for any help.
Isn't that a question for NXP ?
www.nxp.com/.../freedom-development-platform-for-kinetis-kl14-kl15-kl24-kl25-mcus:FRDM-KL25Z
www.nxp.com/.../freedom-development-platform-for-kinetis-kl14-kl15-kl24-kl25-mcus:FRDM-KL25Z?tab=Design_Support_Tab
www.nxp.com/.../support:SUPPORTHOME?tid=sbmenu
Andrew,
Thanks for your response. I should have made clear that the context of the question was ARM Keil MDK 5. As this is an ARM product, I was hoping for help here.
The platform CMSIS files, such as start_MKL25Z4.s and others, that contain the definitions that I mentioned are authored by NXP (Freescale), but I also hoped that CMSIS documentation might make the interface clearer. For example, the SystemCoreClockUpdate function and the SystemCoreClock variable are, I believe, part of the CMSIS interface (described here: www.keil.com/.../group__system__init__gr.html but I probably am misunderstanding what these routines can do).
Yes, I can also post on NXP forums. I have found messages there from others who cannot understand this: but I haven't found an answer yet.
Thanks
William
www.keil.com/.../group__system__init__gr.html
community.nxp.com/.../420210
By reposting the URL www.keil.com/.../group__system__init__gr.html that I put in my message to you, I think you may be telling me that there are no CMSIS functions to set the clock frequency (only to update the value of the variable used elsewhere to get the correct clock speed). Is that correct - if so, I had misunderstood this point so it would be helpful to clarify.
Also, the NXP forum post community.nxp.com/.../420210 contains some hints, but no solution. I guessed this was a common problem and hoped there was a standard solution.
Thanks again
That would seem most likely - the clock system and its configuration is highly vendor specific, so it would be down to the vendor to provide suppoer for their particular features.
SystemInit() is provided as a means for configuring chip and board specific settings which are outside of the scope of a general solution, and unknowns. Going to be highly dependent on input clocks, pins and peripherals for external memories, etc and design choices you've made.
The code should setup your system, and the variable should reflect your expectations of what that should achieve.