Figure 18.12 Operation On Receiving An In Token (Ep4-In: Initial Fifo Is Full) - Renesas H8S/2158 User Manual

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

Advertisement

Section 18 Universal Serial Bus Interface (USB)
USB Host
Send an IN token
packet
Receive an IN data
packet (64 bytes)
Send an ACK
handshake packet
Note: * When an EP4TS interrupt is specified as a USBIB or USBIC interrupt according to the INTSELR0 setting, the corresponding interrupt occurs.
In this case, if a USBIB or USBIC interrupt occurs, interrupt source determination process is not required. (Note that TSFR0 must be accessed
to clear the flags.)
When a NAK handshake is received from the host, the RFU pointer must be rewound to generate an EP4TF interrupt. This EP4TF interrupt
must be handled in the same way as when an IN token is received while the FIFO is empty since an EP4TF interrupt caused by a NAK
handshake and that caused by an IN token are difficult to be distinguished.
Setting the EP4TE bit to 1 to generate data write (pre-read) to the transmit buffer is necessary.

Figure 18.12 Operation on Receiving an IN Token (EP4-IN: Initial FIFO Is Full)

Rev. 3.00 Jan 25, 2006 page 616 of 872
REJ09B0286-0300
USB Function Core
Receive an IN token packet
Send an IN data
packet (64 bytes)
Receive ACK
Send ACK to the slave
CPU
Core Interface
Read data from the EP4
transmission buffer
Request the RFU
transmission
Request to modify
the RFU pointer
Request a USBID interrupt
(EP4TS) *
Write data to the EP4
transmission buffer
(pre-read) and request
the RFU transmission
Slave CPU
Read the RAM-FIFO, send
ACK, and write to the
transmit buffer
Modify the RFU pointer
and send ACK
Initiate the USBID
interrupt processing
Read USBIFR0 and check
if a TS interrupt occurs
or not
Read TSFR0 and check if
an EP4TS interrupt occurs
or not
Read the RFU pointer and
write data to EP4
RAM-FIFO for the number
of bytes which can be
written to, and modify the
RFU pointer
Set the EP4TE bit of
PTTER0 to 1
Clear the EP2TS bit of
TSFR0 to 0
Complete the USBID
interrupt processing
Read the RAM-FIFO, send
ACK, and write to the
transmit buffer

Advertisement

Table of Contents
loading

Table of Contents