atmega32u4-16mu ATMEL Corporation, atmega32u4-16mu Datasheet - Page 33

no-image

atmega32u4-16mu

Manufacturer Part Number
atmega32u4-16mu
Description
Atmega32u4 8-bit Avr Microcontroller With 32k Bytes Of Isp Flash And Usb Controller
Manufacturer
ATMEL Corporation
Datasheet
Clock Switch
Example of use
7766A–AVR–03/08
USB
CPU Clock
External
Oscillator
RC oscillator
non-Idle
Table 6-9.
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
36
The 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.
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.
Figure 1. Example of clock switching with wake-up from USB Host
BOD enabled
Fast rising power
Slowly rising power
for details.
Power Conditions
Ext
3m
Idle
s
Start-up Times for the External Clock Selection
Start-up Time from Power-
down and Power-save
Reserved
w atchdog wake-up
from power-down
6 CK
6 CK
6 CK
(Suspend)
1 Resume from Host
RC
Additional Delay from
Reset (V
14CK + 4.1 ms
14CK + 65 ms
“System Clock Prescaler” on page
14CK
CC
= 5.0V)
ATmega32U4
1
resume
SUT1..0
00
01
10
11
non-Idle
Ext
33

Related parts for atmega32u4-16mu