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?
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:
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:
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:
Which can also be corroborated and perhaps even better illustrated with the use of ConfigTools:
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.