OS Time Change in SleepMode

Hi,

In my project we configured different frequencies as below for MK20FX512VMD12

  • Y1 = 16 MHz crystal oscillator
  • Load capacitance set by OSA0_CR registers = 10 pF
  • Worst-case: freq error +/- 366 Hz (0.0021%)
  • Clock input is selected to EXTAL0
  • Software dividers (full-power mode):
  • PLL pre-divider = 2, multiplier = 30
  • OUTDIV1 = 0 OUTDIV2 = 1 OUTDIV3 = 2   OUTDIV4 = 5

Module Clocks

  • PLL = 240 MHz (16 MHz / 2 * 30)
  • MCGOUTCLK = PLL / 2 = 120 MHz
  • Core Clock = MCGOUTCLK / OUTDIV1 (0) = 120 MHz
  • Bus Clock = MCGOUTCLK / OUTDIV2 (1) = 60 MHz
  • FlexBus Clock = MCGOUTCLK / OUTDIV3 (2) = 40 MHz
  • SRAM Clock = MCGOUTCLK / OUTDIV4 (5) = 20 MHz

Enabled the sleep mode by setting the

LPTMR TEN and TIE bits of LPTMR register

Low Leakage Stop Mode in SMC_PMCTRL register

SLEEPEEP bit in System Control Register

After entering to DeepSleep as per reference manual it is understood that it shuts some of the clocks, during this low power mode how the OS Time will be changed. 

In my project 1tick is equal to 1ms in normal mode, but in low power it is not same, how to calculate it in low power.

Regards,

Venkata

the 

After entering into the sleep mode, there was a change the system clock frequency as