87
8331B–AVR–03/12
Atmel AVR XMEGA AU
Figure 7-3.
External clock drive configuration.
7.4.2.3
32.768kHz Crystal Oscillator
A 32.768kHz crystal oscillator can be connected between the TOSC1 and TOSC2 pins and
enables a dedicated low frequency oscillator input circuit. A typical connection is shown in
. A low power mode with reduced voltage swing on TOSC2 is available. This
oscillator can be used as a clock source for the system clock and RTC, and as the DFLL refer-
ence clock.
Figure 7-4.
32.768kHz crystal oscillator connection.
Two capacitors, C1 and C2, may be added to match the required load capacitance for the con-
nected crystal. For details on recommened TOSC characteristics and capacitor laod, refer to
device datasheets.
7.5
System Clock Selection and Prescalers
All the calibrated internal oscillators, the external clock sources (XOSC), and the PLL output can
be used as the system clock source. The system clock source is selectable from software, and
can be changed during normal operation. Built-in hardware protection prevents unsafe clock
switching. It is not possible to select a non-stable or disabled oscillator as the clock source, or to
disable the oscillator currently used as the system clock source. Each oscillator option has a sta-
tus flag that can be read from software to check that the oscillator is ready.
The system clock is fed into a prescaler block that can divide the clock signal by a factor from 1
to 2048 before it is routed to the CPU and peripherals. The prescaler settings can be changed
from software during normal operation. The first stage, prescaler A, can divide by a factor of
from 1 to 512. Then, prescalers B and C can be individually configured to either pass the clock
through or combine divide it by a factor from 1 to 4. The prescaler guarantees that derived
clocks are always in phase, and that no glitches or intermediate frequencies occur when chang-
ing the prescaler setting. The prescaler settings are updated in accordance with the rising edge
of the slowest clock.
General
Purpose
I/O
XTAL2
XTAL1
External
Clock
Signal
C1
C2
TOSC2
TOSC1
GND