AnsweredAssumed Answered

KSDK Question about CLOCK_GetCoreSysClkFreq & SystemCoreClockUpdate

Question asked by Francois Lion on Apr 14, 2016
Latest reply on Apr 15, 2016 by Francois Lion

Hello,

I have a question regarding Clock APIs of the KSDK.

 

Context:

  • K22F100 MCU and a 10MHz Crystal
  • the clocking system is configured in FEE mode with FRDIV=3 DRST_DRS=3 DMX32=0
  • I am using the new KSDK 2.0

I expect to have a 100MHz System clock with this configuration : 10MHz / 256 * 2560 = 100MHz.

However, all APIs from KSDK 2.0 or earlier (CLOCK_GetCoreSysClkFreq, SystemCoreClockUpdate) report a System clock of 99998720Hz.

 

I understand this is a rouding issue (10MHz/256 = 39062.5Hz), but I am wondering if the "real" System Clock is 100MHz or 99998720Hz due to some internal FLL behavior?

Outcomes