Executing Data Stage (In) With Descriptor Area; Cbw Area; Cbw Area (For Usb Device); Cbw Area (For Usb Host) - Epson S2R72V18 Technical Manual

Table of Contents

Advertisement

1. Functions
1.6.2.2

Executing Data Stage (IN) with Descriptor Area

When using the written data with the descriptor reply function, set the first address of the data to be
sent to the data stage in the D_DescAdrs_H,L registers, the data size to be returned in the
D_DescSize_H,L registers, then the D_EP0Control.ReplyDescriptor bit to 1. Set the
D_EP0Control.INxOUT bit to "1" to allow IN transactions. Be careful to clear the
D_EP0Control_IN.ForceNAK bit after clearing D_SETUP_Control.ProtectEP0 to allow data
packets to be returned to data stage IN transactions.
After setting, data packets up to the data quantity set by the D_DescSize_H,L registers are returned
to the host in response to the IN transaction from the host after automatically dividing them into the
max packet size (set by D_EP0MaxSize). Data is automatically sent as short packets if the
D_DescSize_H,L register values are smaller than the max packet size or if the data quantity
remaining after the division is smaller than the max packet size.
D_EP0Control.ReplyDescriptor is cleared and D_EP0IntStat.DescriptorCmp is set when an OUT
transaction is issued by the host. The firmware should switch to status stage processing.
1.6.3

CBW Area

1.6.3.1

CBW Area (for USB device)

The CBW area is the area used by the bulk-only support function CBW support for USB devices.
This area can be used to receive data when performing BulkOnly Transport Protocol command
transport for Bulk OUT endpoints (endpoints EPa, EPb, EPc, EPd, EPe). This enables only the data
received using data transport to be handled by the endpoint FIFO.
With CBW support, data is received at the CBW area if the OUT transaction is performed for the
endpoint involved and the data size is 31 bytes. The error status is issued and the data is discarded if
the data is not 31 bytes long.
The RAM_Rd function is used to read out data received at the CBW area. Setting the
RAM_RdControl.RAM_GoRdCBW_CSW bit reads the CBW area data and copies it to the
RAM_Rd_00 to RAM_Rd_1E registers before issuing completion status notification
(CPU_IntStat.RAM_RdCmp bit).
1.6.3.2

CBW Area (for USB host)

The CBW area is the area used for the bulk-only support function for USB hosts. CBW data is sent as
data packets from these areas when using the BulkOnly Transport Protocol command transport with
channel CHa. This enables only the data sent using data transport to be handled by the channel FIFO.
CBW data (31 bytes) should be provided in the CBW area from 0x0000 before sending data packets.
The RAM_WrDoor function is used to write data to the CBW area. The CBW area initial address
(0x0000) is written to the RAM_WrAdrs_H,L registers, then 31 bytes of valid data are written via
the RAM_WrDoor_0,1 registers. The CBW area holds 32 bytes; there should be no issue with
leakage into other areas, even when 32 bytes are written in word access.
156
EPSON
S2R72V18 Technical Manual (Rev.1.00)

Advertisement

Table of Contents
loading

Table of Contents