at91rm3400 ATMEL Corporation, at91rm3400 Datasheet - Page 401

no-image

at91rm3400

Manufacturer Part Number
at91rm3400
Description
Atmel Advanced At91 Arm Microcontroller
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
at91rm3400-AU-002
Manufacturer:
Atmel
Quantity:
10 000
Handling Transactions with USB V2.0 Device Peripheral
Setup Transaction
Figure 164. Setup Transaction Followed by a Data OUT Transaction
1790A–ATARM–11/03
USB
Bus Packets
RXSETUP Flag
RX_Data_BKO
(USB_CSRx)
FIFO (DPR)
Content
Setup
PID
Setup Received
XX
Setup is a special type of host-to-device transaction used during control transfers. Control
transfers must be performed using endpoints with no ping-pong attributes. A setup transaction
needs to be handled as soon as possible by the firmware. It is used to transmit requests from
the host to the device. These requests are then handled by the USB device and may require
more arguments. The arguments are sent to the device by a Data OUT transaction which fol-
lows the setup transaction. These requests may also return data. The data is carried out to the
host by the next Data IN transaction which follows the setup transaction. A status transaction
ends the control transfer.
When a setup transfer is received by the USB endpoint:
Thus, firmware must detect the RXSETUP polling the USB_CSRx or catching an interrupt,
read the setup packet in the FIFO, then clear the RXSETUP. RXSETUP cannot be cleared
before the setup packet has been read in the FIFO. Otherwise, the USB device would accept
the next Data OUT transfer and overwrite the setup packet in the FIFO.
Data Setup
The USB device automatically acknowledges the setup packet
RXSETUP is set in the USB_CSRx register
An endpoint interrupt is generated while the RXSETUP is not cleared. This interrupt is
carried out to the microcontroller if interrupts are enabled for this endpoint.
Set by USB Device
ACK
PID
Setup Handled by Firmware
Data OUT
PID
Interrupt Pending
Data Setup
Data OUT
Cleared by Firmware
NAK
PID
Data OUT
PID
Data Out Received
Set by USB
Device Peripheral
XX
Data OUT
AT91RM3400
ACK
PID
Data
OUT
401

Related parts for at91rm3400