Operation On Receiving An In Token (Endpoints 0, 1, 2, 3 And 4); Figure 18.10 Operation On Receiving An In Token (Ep2-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)
18.4.4

Operation on Receiving an IN Token (Endpoints 0, 1, 2, 3 and 4)

Figures 18.10 to 18.13 show the USB function core and LSI firmware operations when the USB
function core receives an IN token (IN transaction). An IN transaction is used for data stage and
status stage of control transfer, interrupt transfer, and bulk transfer.
USB Host
Send an IN token
packet
Receive an IN data
packet (8 bytes)
Send an ACK
handshake packet
Note: * When an EP2TS 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, FVSR2 must be rewound to generate an EP2TF interrupt. This EP2TF
interrupt must be handled in the same way as when an IN token is received while the FIFO is empty since an EP2TF interrupt
caused by a NAK handshake and that caused by an IN token are difficult to be distinguished.

Figure 18.10 Operation on Receiving an IN Token (EP2-IN: Initial FIFO Is Full)

Rev. 3.00 Jan 25, 2006 page 614 of 872
REJ09B0286-0300
USB Function Core
Receive an IN
token packet
Send an IN data
packet (8 bytes)
Receive ACK
Send ACK to
the slave CPU
Core Interface
Read data from EP2
FIFO
Modify FVSR2
Request an USBID
interrupt (EP2TS) *
Write data to the EP2
FIFO
Modify FVSR2 and
enable data transmission
Slave CPU
Initiate the USBID
interrupt processing
Read USBIFR0 and check
if a TS interrupt occurs
or not
Read TSFR0 and check
if an EP2TS interrupt occurs
or not
Read FVSR2 and write data
to EPDR2 for the number
of bytes which can be
written to the EP2 FIFO
Set the EP2TE bit of
PTTER0 to 1
Clear the EP2TS bit of
TSFR0 to 0
Complete the USBID
interrupt processing

Advertisement

Table of Contents
loading

Table of Contents