Datasheet

259
7766F–AVR–11/10
ATmega16/32U4
Figure 21-10. USB Endpoint Interrupt vector sources
Each endpoint has 8 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 inter-
rupt 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
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