Atmel Xplained Pro Evaluation Kit for the ATSAMD21J18A Microcontroller ATSAMD21-XPRO ATSAMD21-XPRO Data Sheet

Product codes
ATSAMD21-XPRO
Page of 1018
173
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181C–SAM-D21_Datasheet–07/2014
In On Demand operation mode, i.e., if the XOSC.ONDEMAND bit has been previously written to one, the oscillator 
will be running only when requested by a peripheral. If there is no peripheral requesting the oscillator s clock 
source, the oscillator will be in a disabled state.
If On Demand is disabled, the oscillator will always be running when enabled.
In standby sleep mode, the On Demand operation is still active if the XOSC.RUNSTDBY bit is one. If 
XOSC.RUNSTDBY is zero, the oscillator is disabled.
0: The oscillator is always on, if enabled.
1: The oscillator is enabled when a peripheral is requesting the oscillator to be used as a clock source. The oscilla-
tor is disabled if no peripheral is requesting the clock source.
z
Bit 6 – RUNSTDBY: Run in Standby
This bit controls how the XOSC behaves during standby sleep mode:
0: The oscillator is disabled in standby sleep mode.
1: The oscillator is not stopped in standby sleep mode. If XOSC.ONDEMAND is one, the clock source will be run-
ning when a peripheral is requesting the clock. If XOSC.ONDEMAND is zero, the clock source will always be 
running in standby sleep mode.
z
Bits 5:3 – Reserved
These bits are unused and reserved for future use. For compatibility with future devices, always write these bits to 
zero when this register is written. These bits will always return zero when read.
z
Bit 2 – XTALEN: Crystal Oscillator Enable
This bit controls the connections between the I/O pads and the external clock or crystal oscillator:
0: External clock connected on XIN. XOUT can be used as general-purpose I/O.
1: Crystal connected to XIN/XOUT.
z
Bit 1 – ENABLE: Oscillator Enable
0: The oscillator is disabled.
1: The oscillator is enabled.
z
Bit 0 – Reserved
This bit is unused and reserved for future use. For compatibility with future devices, always write this bit to zero 
when this register is written. This bit will always return zero when read.