23.1 Overview
The Frequency Meter (FREQM) can be used to accurately measure the frequency of a clock source, GCLK_FREQM_MSR, by comparing it to a known reference clock. It counts the number of periods of the measured clock (GCLK_FREQM_MSR) with respect to the reference clock (GCLK_FREQM_REF). The measurement is done for a period of REFNUM/fGCLK_FREQM_REF and stored in the Value register (VALUE.VALUE). REFNUM is the number of Reference clock cycles selected in the Configuration A register (CFGA.REFNUM) over which the duration of a measurement is to be done.
The frequency of the measured clock, fCLK_MSR, is calculated by:
Where,
Error represents the error introduced by the synchronization mechanism. The error can be a maximum of two measured clock cycles.