SDK_2_14_0_MIMXRT1170-EVK MU driver of CortexM4

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

SDK_2_14_0_MIMXRT1170-EVK MU driver of CortexM4

325 次查看
johannzimmerman
Contributor III

Hello and have a good time.

I have a problem with the MU driver of CortexM4:

SystemCoreClock is set with
#define DEFAULT_SYSTEM_CLOCK 528000000UL.
But according to the docu the CPU can only run up to 400MHz.
SystemCoreClock = CLOCK_GetRootClockFreq(kCLOCK_Root_M4);
returns 200Mhz.

if (SysTick_Config(SystemCoreClock / 1000U))
if SystemCoreClock = 200Mhz
the SysTick runs with 4.44ms .
How can I proceed correctly here?

0 项奖励
2 回复数

291 次查看
johannzimmerman
Contributor III

Calling BOARD_BootClockRUN() for the M4 CPU has helped. Thank you!

0 项奖励

306 次查看
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @johannzimmerman,

Indeed, the DEFAULT_SYSTEM_CLOCK macro definition of the "system_MIMXRT117X_cmX.h" states that the frequency would be 528MHz on the CM4. However this is not the the real case. As you rightfully mention, the maximum frequency for the secondary core of the RT1170 MCUs is 400MHz, and although the definition initially writes the SystemCoreClock variable with 528MHz:

EdwinHz_2-1701900645924.png

This value is overwritten on clock_config.c when setting the configuration of all of the clocks in the MCU, in this case the BOARD_BootClockRUN() routine, as you can see here:

EdwinHz_3-1701900774123.png

In this case, the value would be 392.72MHz, which is the value expected and dictated by the BOARD_BOOTCLOCKRUN_CORE_CLOCK macro definition of the clock_config.h file:

EdwinHz_4-1701901101294.png

Which can also be corroborated and perhaps even better illustrated with the use of ConfigTools:

EdwinHz_5-1701901209923.png

Which leads me to my second point: I recommend you to use ConfigTools for the setup of the clocks, as it is a much more illustrative and friendly way of configuring all of the clocks signals for both cores, without the hassle of doing calculations based on different macro definitions yourself. 

 

Let me know if this helps,

Edwin.

 

 

 

0 项奖励