
IX PERIPHERAL MODULES 7 (USB): USB FUNCTION CONTROLLER (USB)
IX-1-8
EPSON
S1C33E07 TECHNICAL MANUAL
IX.1.4.1 USB Control
Endpoints
This macro has an endpoint (EP0) for control transfer and four general purpose-endpoints (EPa, EPb, EPc,
EPd). Endpoints, EPa, EPb, EPc and EPd can be used as endpoints for bulk- or interrupt- or isochronous-type
transfer, respectively. There is no difference between bulk and interrupt transfers in terns of hardware.
The macro hardware provides endpoints and manages transactions. However, it does not provide a management
function in the interface defined for the USB (hereinafter referred to as USB-defined interface). The USB-
defined interface should be implemented in your firmware. According to the device-specific descriptor
definition, set endpoints as required and configure the USB-defined interface using an appropriate endpoint
combination.
Besides variable control items and statuses that are controlled for each transfer operation, each endpoint has
fixed basic setting items determined by the USB-defined interface. The basic setting items should be set up
when initializing the chip or when the USB-defined interface is switched in response to a SetInterface() request.
Table IX.1.4.1.1 lists the basic setting items for the EP0 endpoint (default control pipe).
The EP0 endpoint shares the register set and FIFO region between the In and OUT directions. For data and
status stages at the EP0 endpoint, set the data transaction direction in your firmware before executing such
stages.
Table IX.1.4.1.1 Basic Setting Items for Endpoint EP0
Register/bit
EP0MaxSize
Description
Sets the maximum packet size to 8, 16, 32 or 64 for
the FS-mode operation.
The EP0 endpoint is assigned a region of the size that
is set in the EP0MaxSize register, starting with FIFO
address 0.
Item
Max. packet size
Table IX.1.4.1.2 lists the basic setting items for the general-purpose endpoints (EPa, EPb, EPc, and EPd).
The EPa, EPb, EPc, and EPd endpoints allow optional settings for the transaction directions and the endpoint
numbers, which allows up to four discrete endpoints to be used. Set up and/or enable these endpoints as
appropriate according to the definitions for the USB-defined interface.
Table IX.1.4.1.2 Setting Items for Endpoints EPa, EPb, EPc and EPd
Register/bit
EPx{x=a,b,c,d}Config.INxOUT
EPx{x=a,b,c,d}MaxSize_H,
EPx{x=a,b,c,d}MaxSize_L
EPx{x=a,b,c,d}Config.EndPointNumber
EPx{x=a,b,c,d}Config.ToggleMode
EPx{x=a,b,c,d}Config.EnEndPoint
EPx{x=a,b,c,d}StartAdrs_H,
EPx{x=a,b,c,d}StartAdrs_L
Description
Sets the transfer direction for each endpoint.
Sets the maximum packet size of each endpoint to any
desired value between 1 and 1024 bytes.
For endpoints that perform bulk transfers, set them to
8, 16, 32 or 64 bytes in FS mode.
Sets each endpoint number to any desired value
between 0x1 and 0xF.
Sets a mode for a toggle sequence. Set it to 0 for an
endpoint that performs bulk transfer.
0: Toggles only in successful transactions.
1: Toggles for every transaction.
Enables each endpoint.
Set it up when the USB-defined interface that uses the
relevant endpoint is enabled.
Sets a region to be assigned to each endpoint using
FIFO addresses.
For a FIFO region, assign a region equivalent to the
maximum packet size set for the relevant endpoint or
greater. Note that the size of the FIFO region affects
data transfer throughput.
For details of FIFO region assignment, see the "FIFO
Management" section.
Item
Transaction direction
Max. packet size
Endpoint number
Toggle mode
Enable endpoint
FIFO region