Renesas H8S/2158 User Manual page 637

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

Advertisement

Bit
Bit Name Initial Value R/W
1
EP0OTC
0
Section 18 Universal Serial Bus Interface (USB)
Description
R/W
Endpoint 0O Transfer Control
Controls the USB function core endpoint 0 control
transfer. Clearing this bit to 0 disables the write to the
EP0 OUT-FIFO. This generates a transfer abnormal
completion interrupt. A change in the direction of data
transfer in the control transfer can be detected by this
interrupt. In control transfer, a command is first received
in a SETUP transaction (setup stage), data is then
transferred in an OUT transaction or IN transaction (data
stage), and a handshake is finally transferred in an IN
transaction or OUT transaction (status stage).
This bit is set to 1 when a SETUP token is received and
command data reception is then enabled after FVSR
initialization. This bit is cleared to 0 after a command
data has been received to protect the EP0 OUT-FIFO
contents. If the received command cannot be processed
in the USB function core, the EP0OTS flag in TSFR0 is
set to 1 and the slave CPU must analyze the command.
After command analysis, if an OUT transaction is
performed at the data stage, the slave CPU must set this
bit to 1 to prepare the OUT transaction; if an IN
transaction is performed at the data stage, the slave
CPU leaves this bit cleared to 0. If the host CPU initiates
an OUT transaction at the status stage, the EP0OTF flag
in TFFR0 is set to 1 to generate a transfer abnormal
completion interrupt. Therefore, the slave CPU can
acknowledge the completion of the data stage. By the
interrupt, the slave CPU sets this bit to 1 to receive
status stage data that is retransferred.
0: Indicates that EP0 OUT-FIFO is in a write stop state.
(The following write to the EP0 OUT-FIFO is
disabled.)
[Clearing conditions]
System reset
Function software reset
Command data reception in SETUP transaction
(EP0OTS flag is set)
1: Indicates that EP0 OUT-FIFO is in an operating state
[Setting conditions]
A SETUP token has been received.
0 is written to EP0OTC after EP0OTC = 1 has been
read.
Rev. 3.00 Jan 25, 2006 page 583 of 872
REJ09B0286-0300

Advertisement

Table of Contents
loading

Table of Contents