Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 2 months ago.
Actual clock speed is only 120MHz instead of 180MHz?
When I print the following line, I see that the system clock is only 120MHz instead of 180MHz. Is there some setting I need to change to increase the clock speed?
Code used to print SystemCoreClock
printf("SystemCoreClock = %d MHz\r\n", SystemCoreClock/1000000);
Question relating to:
1 Answer
7 years, 2 months ago.
Hi Michael,
The answers on this question may help: https://os.mbed.com/questions/78259/System-clock/
I tried out your printf statement on my own K66F, and I am also showing 120 MHz. However, if I add the code below to my main function (before the printf statement), I now see the SystemCoreClock as 160 MHz.
SystemCoreClockUpdate();
The code above is found in the following file:
/mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F/device/system_MK66F18.c
Let me know if you have any questions!
- Jenny, team Mbed
Update: Mahesh's comment above looks correct according to this file: https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F/TARGET_FRDM/fsl_clock_config.c#L137
posted by 15 Sep 2017
120MHz is the setting in Normal Run mode. 180MHz is available in HSRUN mode.
posted by Mahesh Mahadevan 15 Sep 2017