English
Language : 

AT91SAM7X256 Datasheet, PDF (452/637 Pages) ATMEL Corporation – AT91 ARM Thumb-based Microcontrollers
10. The microcontroller transfers out data received from the endpoint’s memory to the
microcontroller’s memory. Data received is available by reading the endpoint’s UDP_
FDRx register.
11. The microcontroller notifies the USB device it has finished the transfer by clearing
RX_DATA_BK1 in the endpoint’s UDP_ CSRx register.
12. A fourth Data OUT packet can be accepted by the USB device and copied in the FIFO
Bank 0.
Figure 35-10. Data OUT Transfer for Ping-pong Endpoint
Host Sends First Data Payload
Microcontroller Reads Data 1 in Bank 0,
Host Sends Second Data Payload
Microcontroller Reads Data2 in Bank 1,
Host Sends Third Data Payload
USB Bus
Packets
Data OUT
PID
Data OUT 1
ACK
PID
Data OUT
PID
Data OUT 2
ACK
PID
Data OUT
PID
Data OUT 3
A
P
RX_DATA_BK0 Flag
(UDP_CSRx)
RX_DATA_BK1 Flag
(UDP_CSRx)
Set by USB Device,
Data Payload Written
in FIFO Endpoint Bank 0
Interrupt Pending
Set by USB Device,
Data Payload Written
in FIFO Endpoint Bank 1
Cleared by Firmware
Cleared by Firmware
Interrupt Pending
FIFO (DPR)
Bank 0
Data OUT1
Write by USB Device
Data OUT 1
Read By Microcontroller
Data OUT 3
Write In Progress
FIFO (DPR)
Bank 1
Data OUT 2
Write by USB Device
Data OUT 2
Read By Microcontroller
Note:
An interrupt is pending while the RX_DATA_BK0 or RX_DATA_BK1 flag is set.
Warning: When RX_DATA_BK0 and RX_DATA_BK1 are both set, there is no way to determine
which one to clear first. Thus the software must keep an internal counter to be sure to clear alter-
natively RX_DATA_BK0 then RX_DATA_BK1. This situation may occur when the software
application is busy elsewhere and the two banks are filled by the USB host. Once the application
comes back to the USB driver, the two flags are set.
35.5.2.8
Status Transaction
A status transaction is a special type of host-to-device transaction used only in a control transfer.
The control transfer must be performed using endpoints with no ping-pong attributes. According
to the control sequence (read or write), the USB device sends or receives a status transaction.
452 AT91SAM7X256/128 Preliminary
6120D–ATARM–02-Feb-06