SAM L10/L11 Frequency Meter (FREQM)

Last modified by Microchip on 2023/11/21 22:02

Overview

FREQM can be used to accurately measure the frequency of a clock by comparing it to a known reference clock.

Features

  • Ratio can be measured with 24-bit accuracy
  • Accurately measures the frequency of an input clock with respect to a reference clock
  • Reference clock can be selected from the available GCLK_FREQM_REF sources
  • Measured clock can be selected from the available GCLK_FREQM_MSR sources

Block Diagram

SAML10 frequency meter diagram

Principle of Operation

FREQM 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/fCLK_REF and is stored in the Value register (VALUE.VALUE).

REFNUM is the number of Reference clock cycles selected in the Configuration A register (CFGA.REFNUM).

The frequency of the measured clock, fCLK_MSR, is calculated by:

fCLK_MSR=VALUE+1+ErrorREFNUM+1fCLK_REF , where "Error" represents the error introduced by the synchronization mechanism. The error can be a maximum of two measured clock cycles.

The reference clock frequency, fCLK_REF, must be slower than the measurement clock frequency, fCLK_MSR.

Refer to the "FREQM – Frequency Meter" chapter from the SAM L10/L11 Family Datasheet for more details.