Clock Setting Problem in Processor Expert Code for MK22FN512xxx12

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

Clock Setting Problem in Processor Expert Code for MK22FN512xxx12

Jump to solution
961 Views
brunopaillard
Contributor III

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

0 Kudos
Reply
1 Solution
788 Views
adriancano
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
2 Replies
789 Views
adriancano
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
788 Views
brunopaillard
Contributor III

Thanks Adrian!

Bruno

0 Kudos
Reply