Datasheet

Table Of Contents
Control B register (CTRLB)
Interrupt Flag Status and Clear register (INTFLAG)
Status register (STATUS)
Optional write protection by the Peripheral Access Controller (PAC) is denoted by the "PAC Write
Protection" property in each individual register description.
Write-protection does not apply to accesses through an external debugger.
Related Links
27. PAC - Peripheral Access Controller
30.6 Functional Description
30.6.1 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/f
CLK_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).
The frequency of the measured clock,
CLK_MSR
, is calculated by
CLK_MSR
=
VALUE
REFNUM
CLK_REF
30.6.2 Basic Operation
30.6.2.1 Initialization
Before enabling FREQM, the device and peripheral must be configured:
Each of the generic clocks (GCLK_FREQM_REF and GCLK_FREQM_MSR) must be configured and
enabled.
Important:  The reference clock must be slower than the measurement clock.
Write the number of Reference clock cycles for which the measurement is to be done in the
Configuration A register (CFGA.REFNUM). This must be a non-zero number.
The following register is enable-protected, meaning that it can only be written when the FREQM is
disabled (CTRLA.ENABLE=0):
Configuration A register (CFGA)
Enable-protection is denoted by the "Enable-Protected" property in the register description.
Related Links
14. GCLK - Generic Clock Controller
30.6.2.2 Enabling, Disabling and Resetting
The FREQM is enabled by writing a '1' to the Enable bit in the Control A register (CTRLA.ENABLE). The
peripheral is disabled by writing CTRLA.ENABLE=0.
SAM D5x/E5x Family Data Sheet
FREQM – Frequency Meter
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 833