Datasheet
34
7766F–AVR–11/10
ATmega16/32U4
When applying an external clock, it is required to avoid sudden changes in the applied clock fre-
quency to ensure stable operation of the MCU. A variation in frequency of more than 2% from
one clock cycle to the next can lead to unpredictable behavior. If changes of more than 2% is
required, ensure that the MCU is kept in Reset during the changes.
Note that the System Clock Prescaler can be used to implement run-time changes of the internal
clock frequency while still ensuring stable operation. Refer to “System Clock Prescaler” on page
37 for details.
6.7 Clock Switch
The ATmega16U4/ATmega32U4 product includes a Clock Switch controller, that allows user to
switch from one clock source to another one by software, in order to control application power
and execution time with more accuracy.
6.7.1 Example of use
The modification may be needed when the device enters in USB Suspend mode. It then
switches from External Clock to Calibrated RC Oscillator in order to reduce consumption and
wake-up delay. In such a configuration, the External Clock is disabled. The firmware can then
use the watchdog timer to be woken-up from power-down in order to check if there is an event
on the application. If an event occurs on the application or if the USB controller signals a non-
idle state on the USB line (Resume for example), the firmware switches the Clock Multiplexer
from the Calibrated RC Oscillator to the External Clock. in order to restart USB operation.
This feature can only be used to switch between Calibrated 8 MHz RC Oscillator, External Clock
and Low Power Crystal Oscillator. The Low Frequency Crystal Oscillator must not be used with
this feature.
Table 6-9. Start-up Times for the External Clock Selection
Power Conditions
Start-up Time from Power-
down and Power-save
Additional Delay from
Reset (V
CC
= 5.0V) SUT1..0
BOD enabled 6 CK 14CK 00
Fast rising power 6 CK 14CK + 4.1 ms 01
Slowly rising power 6 CK 14CK + 65 ms 10
Reserved 11