ATmega8U2/16U2/32U2
• Be sure to have interrupts enabled (WAKEUPE) to exit sleep mode
• Put the MCU in sleep mode
Resuming the USB interface
• Enable PLL
• Wait PLL lock
• Clear USB suspend clock
• Clear Resume information
20.10 Registers Description
20.10.1 USBCON – USB General Control Registers
Bit
(0xD8)
7
USBE
R/W
0
6
-
5
FRZLK
R/W
1
4
-
3
-
2
-
1
-
0
-
USBCON
Read/Write
Initial Value
R
0
R
0
R
0
R
0
R
0
R
0
• Bit 7 – USBE: USB macro Enable Bit
Writing this bit to one enables the USB controller and the USB data buffers (D+ and D-). Clear-
ing this bit disables the USB controller and buffers. When cleared the USB controller is reset.
• Bit 6 – Res: Reserved
This bit is reserved and should always read as zero.
• Bit 5 – FRZCLK: Freeze USB Clock Bit
Writing this bit to one disables the internal clock for the USB controller, and tehreby freezing it.
Activating this mode reduces power consumption. All the USB flags are kept unchanged. Only
the “Resume detection” is still active in this mode.
Writing this bit to zero unfreezes the USB controller and allows full operation of the USB
interface.
• Bits 4:0 – Res: Reserved
These bits are reserved and should always read as zero.
20.10.2 UPOE – USB Software Output Enable register
Bit
(0xFB)
7
6
5
4
UPDRV0
R/W
3
-
2
-
1
DPI
R
0
DMI
R
UPWE1
UPWE0
UPDRV1
UPOE
Read/Write
Initial Value
R/W
0
R/W
0
R/W
0
R
0
R
0
0
0
0
• Bit 7:6 – UPWE[1:0]: USB Buffers Direct Drive enable configuration
These bits select the mode of operation of the USB buffers according to Table 20-2. The possi-
ble configurations of these bits allows to enable or disable the USB buffers direct drive by soft-
ware. When direct drive for USB buffers is enable, the UPDRV[1:0] values are output to the
195
7799D–AVR–11/10