
SH7285/SH7286 USB Function Module
USB to Serial Conversion Application Note
2.5.1 Bulk OUT Transfer
A bulk OUT transfer is composed of single or multiple OUT transactions. The USB host sends an OUT token and a
data packet in the OUT transaction. The USB device receives the out token first, then receives the data packet, and
then returns an ACK handshake. When the USB device receives the OUT token although it is unable to receive data
packets, it ignores subsequent data packets and returns a NAK handshake. When the USB host receives a NAK
handshake, it attempts to resend the OUT token and data packet to the USB device.
Figure 2.14 shows the OUT
Transaction flowchart.
When the USB function module receives an OUT token although it is unable to receive data packets, it automatically
discards subsequent data packets and returns a NAK handshake to the USB host. When the USB function module
receives an OUT token when it can accept data packets, it holds the data from the USB host in the EP1FIFO and
returns an ACK handshake to the USB host. Then, the USB function module generates the data receive complete
interrupt using the EP1FULL bit in the USBIFR0 register.
The sample program reads the data in the EP1FIFO and stores it in the bulk OUT transfer RAM during the interrupt,
sets the EP1 read complete flag (by setting the EP1RDFN bit in the USBTRG register to 1), and waits for the next
interrupt to be generated. When the interrupt is generated, if there is no area in the EP1FIFO to store data, the sample
program disables the EP1FULL interrupt, and the interrupt process is completed while it is in a suspended state. When
serial communication is used to create an area in the bulk OUT transfer RAM, enabling the EP1FULL interrupt
causes the suspended EP1FULL interrupt to be generated, and moves the data in the EP1FIFO to the bulk OUT
transfer RAM during the interrupt, and sets the EP1 read complete flag to wait for the next interrupt to be generated.
Idle
OUT token
Idle
Token
Data
Handshake
ACK
NAK STALL
DATA0/1
NYET
Packet issued by the host
Packet issued by the device
Figure 2.14 OUT Transaction
REJ05B1152-0100/Rev.1.00 May 2008 Page 17 of 35
Kommentare zu diesen Handbüchern