i.MX8M mini M4 Core clock change

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

i.MX8M mini M4 Core clock change

跳至解决方案
1,020 次查看
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 项奖励
回复
1 解答
880 次查看
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 项奖励
回复
2 回复数
881 次查看
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 项奖励
回复
880 次查看
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 项奖励
回复