Figure 8.6 Operation Flow Of Usb Out Transfer - Renesas H8S/2158 User Manual

16-bit single-chip microcomputer h8s family/h8s/2100 series
Table of Contents

Advertisement

Section 8 RAM-FIFO Unit (RFU)
Hardware (USB, RFU)
IDLE
Receive OUT token from the host
No
Is EP5 stalled?
Yes
No
Is EP5 receive buffer
empty?
For instance, the RFU update processing of
Yes
previous data communication is not completed
No
Is receive buffer busy ?
Yes
Start data reception from
the host
No
Does the EP5
receive buffer
overrun?
Yes
No
Does received data
include any errors?
Yes
End data reception from the host
From the device
Transmit ACK packet
No
Is EP5 receive
buffer empty?
Yes
Write data to RFU/FIFO
End data transmission correctly
Manipulate pointer
update to the RFU
Set the EP5TS interrupt flag
Request USBID interrupt
IDLE
Rev. 3.00 Jan 25, 2006 page 196 of 872
REJ09B0286-0300
The host transmits
data but it is not
received by
the device side
Transmit STALL
packet
No
Does RFU/FIFO
overrun?
Yes
Set the EP5UTDR interrupt flag
To (B)

Figure 8.6 Operation Flow of USB OUT Transfer

TS
Read TSFR0 to confirm
the EP5TS interrupt
The host transmits
data but it is not
received by
the device side
From the device
Transmit NAK
No handshake
packet
(timeout)
From the device
End data transmission abnormally
No
Abnormally end
during data phase?
Yes
Manipulate pointer
rewind to the RFU
Set the EP5TF interrupt flag
Firmware (CPU)
(B)
Start USBID interrupt handling
Read from USBIFR0 and
USBIFR1 to judge
an interrupt source
TF
UDTR
Read TFFR0 to confirm
Read UDTRFR to confirm
the EP5TF interrupt
the EP5UDTR interrupt
No
Is it necessary to
read data from
RFU/FIFO?
Yes
Read data from
RFU/FIFO
(MMC, etc.)
Clear interrupt flag
End USBID interrupt processing

Advertisement

Table of Contents
loading

Table of Contents