Hi
The code that processor Expert generates to manage the clocks (set a new clock) on the MK22FN512 does not seem to allow HSRUN mode, except when it is initially set in CPU_CLOCK_CONFIG_0
More specifically, I believe the function CPU_SetClockConfiguration () in CPU_Init.c has the following error:
- At line 767, the line " if ((CPU_ClockConfigDescriptors[ClockConfigurationID].PowerMode & CPU_CLOCK_HSRUN_ENABLE_MASK) != 0U) {" uses ClockConfigurationID, instead of [the argument of the function] ModeID
At that point, ClockConfigurationID has not been initialized to ModeID yet. So it really represents the last clock configuration, NOT the one we want.
- Moving line 827" ClockConfigurationID = ModeID; /* Store clock configuration identifier */" up, to before line 767 above resolves the problem.
This does not create an immediate problem because it seems that the CPU runs remarkably well at 120 MHz in RUN mode...! At least at room temperatures
Bruno
Solved! Go to Solution.
Hi,
I was testing the behavior you are reporting and found the same behavior. I think this is a bug on the Processor Expert code.
I already reported the issue to the development team.
Thank you for your interest in the Freescale products.
Hope this information can help you.
Best Regards,
Adrian Sanchez Cano
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi,
I was testing the behavior you are reporting and found the same behavior. I think this is a bug on the Processor Expert code.
I already reported the issue to the development team.
Thank you for your interest in the Freescale products.
Hope this information can help you.
Best Regards,
Adrian Sanchez Cano
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks Adrian!
Bruno