IX PERIPHERAL MODULES 7 (USB): USB FUNCTION CONTROLLER (USB)
IX-1-26
EPSON
S1C33E07 TECHNICAL MANUAL
Using the descriptor area
The descriptor area provides high-speed, straightforward execution of part of operations for packets received/
transmitted via EP0, or a standard request. Among contents of standard requests, write those in this area that are
uniquely determined by the device during the initial setup stage following power-on to automatically execute
the data stage included in the request simply by setting the top address and the data size in response to a request
from the host. Accordingly, this technique eliminates the need of writing data in the EP0 area, enabling very
quick response to a request.
Writing data in the descriptor area
To write data in the descriptor area, first set the write start address in the DescAdrs_H and DescAdrs_L
registers, and then write data in the DescDoor register (RegWindowSel == 0x2). After completing writing data,
the DescAdrs_H and DescAdrs_L registers are automatically incremented by one, enabling sequential writing
in the DescDoor register (RegWindowSel == 0x2) when writing data at a series of adjacent addresses. Note that
this incrementing function does not mean that written data can be read when writing and reading are executed
sequentially; it only increments by one for both writing and reading.
Reading data from descriptor area
To read data from the descriptor area, first set the read start address in the DescAdrs_H and DescAdrs_L
registers, and then read data from the DescDoor register (RegWindowSel == 0x2). After completing reading
data, the DescAdrs_H and DescAdrs_L registers are automatically incremented by one, enabling sequential
reading in the DescDoor register (RegWindowSel == 0x2) when reading data from a series of adjacent
addresses. Note that this incrementing function does not mean that written data can be read when writing and
reading are executed sequentially; it only increments by one for both writing and reading.
Executing data stage (IN) in the descriptor area
To use written data in response to a request from EP0, set the top address of the data to be transmitted to the
data stage, set the data size specified in the request in the DescSize_H and DescSize_L registers, and then set
the EP0Control.ReplyDescriptor bit to 1.
After receiving the IN token from the host, the macro start transmitting data to the host, automatically splitting
them into the maximum packet size (set in the EP0MaxSize). In addition, if the value in the DescSize_H or
DescSize_L register is under the maximum packet size, or if the remaining number of data after splitting, the
macro automatically transmits such data as short packets. When the specified number of data are completely
transmitted, the EP0Control.ReplyDescriptor is cleared and the FIFO_IntStat.DescriptorCmp is set. At this
stage, the FIFO_IntEnb.EnDescriptorCmp bit is set and the MainIntEnb.EnEPrIntStat bit is set as well, the
#INT signal is asserted at the same time.
If the process enters a status stage before the transmitted amount reaches the specified number of data (that is,
if an OUT token is received), the EP0Control.ReplyDescriptor is automatically cleared to suspend this function.
At the same time, the EP0IntStat.OUT_TranNAK status and the FIFO_IntStat.DescriptorCmp status are set. If
either of the following sets of bits are set, the #INT signal is asserted at the same time:
(1) The EP0IntEnb.EnOUT_TranNAK, MainIntEnb.EnEP0IntStat and MainIntEnb.EnEPrIntStat bits, or
(2) The FIFO_IntEnb.EnDescriptorCmp and MainIntEnb.EnEPrIntStat bits.