36
4958B–AUTO–11/10
Atmel ATA6285/ATA6286 [Preliminary]
3.7.7
System Clock Prescaler (CLK)
The Atmel
the power consumption when the requirement for processing power is low. The input clock (CL)
for the prescaler is selectable by the Clock Module Unit, and it will affect the clock frequency of
the CPU and all synchronous peripherals. CLK
I/O, CLKCPU, and CLKFlash are divided by a factor
When switching between prescaler settings, the System Clock Prescaler ensures that no
glitches occur in the clock system. It also ensures that no intermediate frequency is higher than
neither the clock frequency corresponding to the previous setting, nor the clock frequency corre-
sponding to the new setting. The ripple-counter that implements the prescaler runs at the
frequency of the undivided clock, which may be faster than the CPU's clock frequency. Hence, it
is not possible to determine the state of the prescaler - even if it were readable, and the exact
time it takes to switch from one clock division to the other cannot be exactly predicted. To avoid
unintentional changes of clock frequency, a special write procedure must be followed to change
the CLKPS[2..0] bits:
1.
Write the Clock Prescaler Change Enable (CLPCE) bit to one and all other bits in
CLKPR to zero.
2.
Within four cycles, write the desired value to CLKPS[2..0] while writing a zero to
CLPCE.
Interrupts must be disabled when changing prescaler setting to make sure the write procedure is
not interrupted.
3.7.8
Timer Clock Prescaler (CLT)
clock (CL) for the prescaler is selectable by the Clock Module Unit, and it will affect the clock fre-
between prescaler settings, the Timer Clock Prescaler ensures that no glitches occur in the
clock system. It also ensures that no intermediate frequency is higher than neither the clock fre-
quency corresponding to the previous setting, nor the clock frequency corresponding to the new
setting. The ripple-counter that implements the prescaler runs at the frequency of the undivided
clock, which may be faster than the Timer's clock frequency. Hence, it is not possible to deter-
mine the state of the prescaler - even if it were readable, and the exact time it takes to switch
from one clock division to the other cannot be exactly predicted. To avoid unintentional changes
of clock frequency, a special write procedure must be followed to change the CLTPS[2..0] bits:
1.
Write the Clock Prescaler Change Enable (CLPCE) bit to one and all other bits in
CLKPR to zero.
2.
Within four cycles, write the desired value to CLTPS[2..0] while writing a zero to
CLPCE.
Interrupts must be disabled when changing prescaler setting to make sure the write procedure is
not interrupted.