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.
Andrew,
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
William
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.