Datasheet

262
ATmega16U4/32U4 [DATASHEET]
Atmel-7766J-USB-ATmega16U4/32U4-Datasheet_04/2016
Figure 21-10. USB Endpoint Interrupt Vector Sources
Each endpoint has eight interrupts sources associated with flags, and each source can be enabled or not to
trigger the corresponding endpoint interrupt. If, for an endpoint, at least one of the sources is enabled to trigger
interrupt, the corresponding event(s) will make the program branch to the USB Endpoint Interrupt vector. The
user may determine the source (endpoint) of the interrupt by reading the UEINT register, and then handle the
event detected by polling the different flags.
21.7 Power Modes
21.7.1 Idle Mode
In this mode, the CPU core is halted (CPU clock stopped). The Idle mode is taken wether the USB controller is
running or not. The CPU “wakes up” on any USB interrupts.
21.7.2 Power Down
In this mode, the oscillator is stopped and halts all the clocks (CPU and peripherals). The USB controller “wakes
up” when:
the WAKEUPI interrupt is triggered
the VBUSTI interrupt is triggered
21.7.3 Freeze Clock
The firmware has the ability to reduce the power consumption by setting the FRZCLK bit, which freeze the clock
of USB controller. When FRZCLK is set, it is still possible to access to the following registers:
FLERRE
UEIENX.7
OVERFI
UESTAX.6
UNDERFI
UESTAX.5
NAKINI
UEINTX.6
NAKINE
UEIENX.6
NAKOUTI
UEINTX.4
TXSTPE
UEIENX.4
RXSTPI
UEINTX.3
RXSTPE
UEIENX.3
RXOUTI
UEINTX.2
RXOUTE
UEIENX.2
STALLEDI
UEINTX.1
STALLEDE
UEIENX.1
EPINT
UEINT.X
Endpoint 0
Endpoint 1
Endpoint 2
Endpoint 3
Endpoint 4
Endpoint 5
TXINI
UEINTX.0
TXINE
UEIENX.0
USB Endpoint
Interrupt Vector
Endpoint 6