English
Language : 

PXS20RM Datasheet, PDF (245/1368 Pages) Freescale Semiconductor, Inc – PXS20 Microcontroller
Clock Monitor Unit (CMU)
12.4.1.4 Frequency meter
The frequency meter, which is part of CMU_0, calibrates the IRCOSC using a known frequency.
NOTE
This value can then be stored in the flash memory so that application
software can reuse it later on.
The reference clock is always the XOSC. A simple frequency meter returns a draft value of
IRCOSC_CLK. The measurement starts when CMU_CSR[SFM] is set. The measurement duration is
given by the CMU_MDR register in terms of IRCOSC_CLK cycles with a width of 20 bits. The SFM bit
is cleared by the hardware after the frequency measurement is done and the count is loaded in the
CMU_FDR. FIRCOSC_CLK can be derived from the value loaded in the CMU_FDR register as follows:
FIRCOSC_CLK = (FXOSC_CLK × MD)  n
where n is the value in CMU_FDR register and MD is the value in CMU_MDR.
Eqn. 12-1
Freescale Semiconductor
PXS20 Microcontroller Reference Manual, Rev. 1
12-9