240
8331B–AVR–03/12
Atmel AVR XMEGA AU
BUSNACK0 and TRNCOMPL0 are set and TOGGLE is toggled. TRNIF is set and the endpoint's
configuration table address is written to the FIFO if the transcation complete FIFO mode is
enabled.
When an IN token is detected and the device address of the token packet does not match that of
the endpoint, the packet is discarded and the USB module returns to idle and waits for the next
token packet.
Figure 20-5.
IN transaction.
20.4
SRAM Memory Mapping
The USB module uses internal SRAM to store the:
• Endpoint configuration table
• USB frame number
• Transaction complete FIFO
The endpoint pointer register (EPPTR) is used to set the SRAM address for the endpoint config-
uration table. The USB frame number (FRAMENUM) and transaction complete FIFO (FIFO)
locations are derived from this. The locations of these areas are selectable inside the internal
SRAM.
gives the relative memory location of each area.
IN
TOKEN
ADDRESS
ADDRESS
MATCH?
ENDPOINT
LEGAL
ENDPOINT?
EP STATUS
ENABLED?
DATA
ACK
PAYLOAD
OK?
IDLE
o
N
o
N
o
N
No
STALL &
NO ISO?
STALL
NAK
No
READ
CONFIG
READ
DATA
READ
CONFIG
UPDATE
STATUS
Yes
s
e
Y
s
e
Y
s
e
Y
Yes
BUSNACK0
SET?
ISO?
Yes
No
ISO?
ACK
SET?
No
Yes
Yes
Yes
No
No
ZLP
CRC