37
32059L–AVR32–01/2012
AT32UC3B
9.4
Product Dependencies
9.4.1
I/O Lines
The PM provides a number of generic clock outputs, which can be connected to output pins,
multiplexed with GPIO lines. The programmer must first program the GPIO controller to assign
these pins to their peripheral function. If the I/O pins of the PM are not used by the application,
they can be used for other purposes by the GPIO controller.
9.4.2
Interrupt
The PM interrupt line is connected to one of the internal sources of the interrupt controller. Using
the PM interrupt requires the interrupt controller to be programmed first.
9.4.3
Clock implementation
In AT32UC3B, the HSB shares the source clock with the CPU. This means that writing to the
HSBDIV and HSBSEL bits in CKSEL has no effect. These bits will always read the same as
CPUDIV and CPUSEL.
9.5
Functional Description
9.5.1
Slow clock
The slow clock is generated from an internal RC oscillator which is always running, except in
Static mode. The slow clock can be used for the main clock in the device, as described in
”Syn-measuring various delays in the Power Manager.
The RC oscillator has a 3 cycles startup time, and is always available when the CPU is running.
The RC oscillator operates at approximately 115 kHz, and can be calibrated to a narrow range
by the RCOSCCAL fuses. Software can also change RC oscillator calibration through the use of
the RCCR register. Please see the Electrical Characteristics section for details.
RC oscillator can also be used as the RTC clock when crystal accuracy is not required.
9.5.2
Oscillator 0 and 1 operation
The two main oscillators are designed to be used with an external crystal and two biasing capac-
itors, as shown in
Figure 9-2. Oscillator 0 can be used for the main clock in the device, as
The oscillators are disabled by default after reset. When the oscillators are disabled, the XIN and
XOUT pins can be used as general purpose I/Os. When the oscillators are configured to use an
external clock, the clock must be applied to the XIN pin while the XOUT pin can be used as a
general purpose I/O.
The oscillators can be enabled by writing to the OSCnEN bits in MCCTRL. Operation mode
(external clock or crystal) is chosen by writing to the MODE field in OSCCTRLn. Oscillators are
automatically switched off in certain sleep modes to reduce power consumption, as described in
After a hard reset, or when waking up from a sleep mode that disabled the oscillators, the oscil-
lators may need a certain amount of time to stabilize on the correct frequency. This start-up time
can be set in the OSCCTRLn register.