English
Language : 

ATMEGA8U2_14 Datasheet, PDF (199/310 Pages) ATMEL Corporation – 125 Powerful Instructions – Most Single Clock Cycle Execution
Figure 21-2. Endpoint activation flow:
ATmega8U2/16U2/32U2
As long as the endpoint is not correctly configured (CFGOK cleared), the hardware does not
acknowledge the packets sent by the host.
CFGOK will not be set if the Endpoint size parameter is bigger than the DPRAM size.
A clear of EPEN acts as an endpoint reset (see “Endpoint reset” on page 197 for more details).
It also performs the next operation:
• The configuration of the endpoint is kept (EPSIZE, EPBK, ALLOC kept)
• It resets the data toggle field.
• The DPRAM memory associated to the endpoint is still reserved.
See “Memory management” on page 192 for more details about the memory
allocation/reorganization.
21.7 Address Setup
The USB device address is set up according to the USB protocol:
• the USB device, after power-up, responds at address 0
• the host sends a SETUP command (SET_ADDRESS(addr)),
• the firmware records that address in UADD, but keep ADDEN cleared,
• the USB device sends an IN command of 0 bytes (IN 0 Zero Length Packet) to acknowledge
the transaction,
• then, the firmware may enable the USB device address by setting ADDEN. The only
accepted address by the controller is the one stored in UADD.
ADDEN and UADD shall not be written at the same time.
7799D–AVR–11/10
199