i.MX8M mini M4 Core clock change

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

i.MX8M mini M4 Core clock change

Jump to solution
817 Views
m_morimune
Contributor I

Is there any problem with the i.MX8M mini when the M4 Core side changes the Core clock with its own program after startup?

For example, suppose that the CORE clock is raised to 400MHz with the following function of NXP_SDK after startup. 

 CLOCK_SetRootDivider (kCLOCK_RootM4, 1U, 2U);

 CLOCK_SetRootMux (kCLOCK_RootM4, kCLOCK_M4RootmuxSysPll1); / * switch cortex-m4 to SYSTEM PLL1 * /

In this case, can the clock be switched safely without causing glitches?

0 Kudos
1 Solution
677 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Masahiro,

From the functionality point of view, no glitches should occur when switching clock modes (with the proper functions that waits for the lock of the PLLs).

However, if the SDK uses macros (on compile time) to generate the time bases (most of this, for FreeRTOS), the time bases may be broken when changing the clock bases on-on-the-fly. So, it is recommended applying the proper macro modification considering the clocks that are going to be used on the application and recompiling the SDK also including your custom functions for clock changes.

Hope this will be useful for you.
Best regards!
/Carlos
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

-------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
678 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Masahiro,

From the functionality point of view, no glitches should occur when switching clock modes (with the proper functions that waits for the lock of the PLLs).

However, if the SDK uses macros (on compile time) to generate the time bases (most of this, for FreeRTOS), the time bases may be broken when changing the clock bases on-on-the-fly. So, it is recommended applying the proper macro modification considering the clocks that are going to be used on the application and recompiling the SDK also including your custom functions for clock changes.

Hope this will be useful for you.
Best regards!
/Carlos
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

-------------------------------------------------------------------------------

0 Kudos
677 Views
m_morimune
Contributor I

Hi Carlos,

Thank you for your response.
I understood that there was no functional problem.
Also, thank you for contacting me about the cautions.

Best regards

masahiro

0 Kudos