I was trying to change the system clock on my Renesas RA MCU. While inspecting the CMSIS/FSP startup code (system_RA.c), I noticed the following in SystemInit():
/* Initialize SystemCoreClock variable. */
//SystemCoreClockUpdate();
-
The
SystemCoreClockUpdate()call is commented out. -
Directly calling
SystemCoreClockUpdate()does not reconfigure the hardware; it only updates the variable. -
Actual clock setup is done in the BSP/FSP initialization code.
I want to understand:
-
How can I correctly update
SystemCoreClockso it reflects the current MCU frequency? -
Can this be done without modifying FSP-generated clock configuration, or do I need to adjust the BSP settings directly?