6.1.4
USB Clock – clkUSB
The USB is provided with a dedicated clock domain. This clock is generated with an on-chip PLL
running at 48MHz. The PLL always multiply its input frequency by 6. Thus the PLL clock register
should be programmed by software to generate a 8MHz clock on the PLL input.
6.2
Clock Switch
In the AT90USB82/162 product, the Clock Multiplexer and the System Clock Prescaler can be
modified by software.
6.2.1
Exemple of use
The modification can occur when the device enters in USB Suspend mode. It then switches from
External Clock to Calibrated RC Oscillator in order to reduce consumption. In such a configura-
tion, the External Clock is disabled.
The firmware can 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.
Figure 6-2. Example of clock switching with wake-up from USB Host
resume
Resume from Host
1
USB
(Suspend)
non-Idle
Idle
Ext
non-Idle
Ext
1
CPU Clock
RC
External
Oscillator
RC oscillator
3ms
watchdog wake-up
from power-down
26
AT90USB82/162
7707D–AVR–07/08