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?
Solved! Go to Solution.
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!
-------------------------------------------------------------------------------
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!
-------------------------------------------------------------------------------
Hi Carlos,
Best regards
masahiro