
40
32059L–AVR32–01/2012
AT32UC3B
any tapping of this prescaler, or the undivided main clock, as long as fCPU fPBA,B,. The synchro-
nous clock source can be changed on-the fly, responding to varying load in the application. The
Additionally, the clocks for each module in the four domains can be individually masked, to avoid
power consumption in inactive modules.
Figure 9-4.
Synchronous clock generation
9.5.5.1
Selecting PLL or oscillator for the main clock
The common main clock can be connected to the slow clock, Oscillator 0, or PLL0. By default,
the main clock will be connected to the slow clock. The user can connect the main clock to Oscil-
lator 0 or PLL0 by writing the MCSEL bitfield in the Main Clock Control Register (MCCTRL). This
must only be done after that unit has been enabled, otherwise a deadlock will occur. Care
should also be taken that the new frequency of the synchronous clocks does not exceed the
maximum frequency for each clock domain.
9.5.5.2
Selecting synchronous clock division ratio
The main clock feeds an 8-bit prescaler, which can be used to generate the synchronous clocks.
By default, the synchronous clocks run on the undivided main clock. The user can select a pres-
caler division for the CPU clock by writing CKSEL:CPUDIV to 1 and CPUSEL to the prescaling
value, resulting in a CPU clock frequency:
fCPU = fmain / 2
(CPUSEL+1)
Mask
Prescaler
Osc0 clock
PLL0 clock
MCSEL
0
1
CPUSEL
CPUDIV
Main clock
Sleep
Controller
CPUMASK
CPU clocks
HSB clocks
PBAclocks
PBB clocks
Sleep
instruction
Slow clock