
Page 104
Epson Research and Development
Vancouver Design Center
S1D13A05
Programming Notes and Examples
X40A-G-003-04
Issue Date: 2002/08/21
The USB controller is ready for operation with the following configuration:
Endpoint 1 (mailbox receive) is configured for bulk OUT and Endpoint 2 (mailbox
transmit) is configured for interrupt IN. The functionality of these endpoints cannot be
altered.
Endpoint 3 (FIFO receive) is configured for bulk in and Endpoint 4 (FIFO transmit) is
configured for bulk out. Endpoints 3 and 4 may also be configured for isochronous oper-
ation.
When the S1D13A05 is connected to a host controller, the host will issue a RESET
command to the S1D13A05. In response to the RESET the S1D13A05 clears all USB
registers in the range REG[4000h] to REG[403Ah]. The client software must respond to the
reset and reprogram the USB registers. A host controller may issue a RESET at any time
during operation.
After the S1D13A05 receives the RESET and re-initializes the registers, the host controller
starts the USB SETUP phase. The SETUP sequence is handled entirely by the S1D13A05
USB controller. After the setup is complete the S1D13A3 is ready to begin transferring
data.
Note
Prior to initializing the registers, host controller accesses are responded to with NAKs.
After being configured, host controller accesses will be handled in the normal way.
Note
A Vendor ID can be obtained through the USB Implementers Forum at
http://www.usb.org.
10.3 Data Transfers
The S1D13A05 USB requires very little local CPU assistance during data transfers. For the
most part data transfers from the host involve reading a FIFO data register when notified of
that the transfer is complete or writing a FIFO register and setting a ’ready’ bit to send data
to the host.
The following sections expand on the data transfer mechanism.
10.3.1 Receiving Data from the Host - the OUT command
Data transferred from the host to the S1D13A05 is directed to either EndPoint 1 (the
mailbox) or EndPoint 3 (the FIFO). When the data packet has been successfully received
the S1D13A05 generates an interrupt.
On receipt of the interrupt the local CPU examines the masked interrupt status registers
REG[404Eh] and REG[4050h] to determine the source of the interrupt. If the interrupt
came from bit 0 of the Negative Interrupt Masked Status register, REG[4050h], the next
step is to examine REG[4004] to determine the exact cause of the interrupt.