Scanning the Clock Pins
The AVR devices have many clock options selectable by fuses. These are: Internal RC
Oscillator, External RC, External Clock, (High Frequency) Crystal Oscillator, Low-fre-
quency Crystal Oscillator, and Ceramic Resonator.
Figure 131 shows how each Oscillator with external connection is supported in the scan
chain. The Enable signal is supported with a general boundary-scan cell, while the
Oscillator/clock output is attached to an observe-only cell. In addition to the main clock,
the timer Oscillator is scanned in the same way. The output from the internal RC Oscilla-
tor is not scanned, as this Oscillator does not have external connections.
Figure 131. Boundary-scan Cells for Oscillators and Clock Options
XTAL1/TOSC1 XTAL2/TOSC2
ShiftDR
To
Next
Cell
EXTEST
Oscillator
0
ENABLE
OUTPUT
1
0
DQ
DQ
1
G
ShiftDR
To
Next
Cell
FF1
0
DQ
1
From
Previous
Cell
ClockDR UpdateDR
From
Previous
Cell
ClockDR
Table 103 summaries the scan registers for the external clock pin XTAL1, oscillators
with XTAL1/XTAL2 connections as well as 32 kHz Timer Oscillator.
Table 103. Scan Signals for the Oscillators(1)(2)(3)
Enable
Signal
Scanned Clock
Line
Clock Option
EXTCLKEN EXTCLK (XTAL1) External Clock
OSCON
OSCCK
External Crystal
External Ceramic Resonator
RCOSCEN
RCCK
External RC
OSC32EN
OSC32CK
Low Freq. External Crystal
TOSKON
TOSCK
32 kHz Timer Oscillator
Scanned Clock Line
when Not Used
0
0
0
1
0
Notes:
1. Do not enable more than one clock source as main clock at a time.
2. Scanning an Oscillator output gives unpredictable results as there is a frequency drift
between the internal Oscillator and the JTAG TCK clock. If possible, scanning an
external clock is preferred.
3. The clock configuration is programmed by fuses. As a fuse does not change run-time,
the clock configuration is considered fixed for a given application. The user is advised
to scan the same clock option as to be used in the final system. The enable signals
are supported in the scan chain because the system logic can disable clock options
262 ATmega64(L)
2490G–AVR–03/04