28 USB FUNCTION CONTROLLER (USB)
28-4
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
The macro issues a status to the firmware for each transaction. However, the firmware does not always have
to control respective transactions. The macro references the FIFO when responding to a transaction and deter-
mines if data transfer is possible based on the number of data or vacancies to automatically handle the transac-
tion.
For example, for an OUT endpoint, the firmware can smoothly and sequentially process OUT transactions by
reading data from the FIFO region via either the Port interface (EPa, EPb, EPc, EPd) or the CPU interface (EP0,
EPa, EPb, EPc, EPd) to create a space in the FIFO region. On the other hand, for an IN endpoint, the firmware
can smoothly and sequentially process IN transactions by writing data in the FIFO region via either the Port in-
terface (EPa, EPb, EPc, EPd) or the CPU interface (EP0, EPa, EPb, EPc, EPd) to create valid data.
Table 28.5.1.3 lists control items and statuses related to transaction control on the EP0 endpoint.
5.1.3 Control Items and Statuses for Endpoint EP0
Table 28.
Item
Register/bit
Description
Transaction direction
EP0Control.INxOUT
Sets the transfer direction at the data and status stages.
Enable descriptor return EP0Control.ReplyDescriptor
Activates automatic descriptor return.
Enable short packet
transmission
EP0ControlIN.EnShortPkt
Enables transmission of short packets that are under the
maximum packet size. This setting is cleared after the IN
transaction that has transmitted a short packet is completed.
Toggle sequence bit
EP0ControlIN.ToggleStat,
EP0ControlOUT.ToggleStat
Indicates the state of the toggle sequence bit.
This setting is automatically initialized by the SETUP stage.
Set toggle
EP0ControlIN.ToggleSet,
EP0ControlOUT.ToggleSet
Sets the toggle sequence bit.
Clear toggle
EP0ControlIN.ToggleClr,
EP0ControlOUT.ToggleClr
Clears the toggle sequence bit.
Forced NAK response
EP0ControlIN.ForceNAK,
EP0ControlOUT.ForceNAK
Returns a NAK response to IN or OUT transactions regard-
less of the number of data or vacancies in the FIFO region.
STALL response
EP0ControlIN.ForceSTALL,
EP0ControlOUT.ForceSTALL
Returns a STALL response to IN or OUT transactions.
Set automatic ForceNAK EP0ControlOUT.AutoForceNAK
Sets the EP0ControlOUT.ForceNAK bit whenever an OUT
transaction is completed.
SETUP reception status MainIntStat.RcvEP0SETUP
Indicates that a SETUP transaction is executed.
Transaction status
EP0IntStat.IN_TranACK,
EP0IntStat.OUT_TranACK,
EP0IntStat.IN_TranNAK,
EP0IntStat.OUT_TranNAK,
EP0IntStat.IN_TranErr,
EP0IntStat.OUT_TranErr
Indicates the result of the transaction.
Table 28.5.1.4 lists control items and statuses related to transaction processing on the EPa, EPb, EPc, and EPd
endpoints.
5.1.4 Control Items and Statuses for Endpoints EPa, EPb, EPc, and EPd
Table 28.
Item
Register/bit
Description
Set automatic ForceNAK EP
x
{
x
=a,b,c,d}Control.AutoForceNAK
Sets the endpoint’s EP
x
{
x
=a,b,c,d}Control.ForceNAK bit
whenever an OUT transaction is completed.
Enable shor t packet
transmission
EP
x
{
x
=a,b,c,d}Control.EnShortPkt
Enables transmission of short packets that are under the
maximum packet size for IN transactions. This setting is
cleared after the IN transaction that has transmitted a short
packet is completed.
Disable automatic
ForceNAK setting upon
short packet reception
EP
x
{
x
=a,b,c,d}Control.
DisAF_NAK_Short
In OUT transactions, reception of a short packet automatically
disables the function that sets the endpoint’s EP
x
{
x
=a,b,c,d}
Control.ForceNAK bit.
Toggle sequence bit
EP
x
{
x
=a,b,c,d}Control.ToggleStat
Indicates the state of the toggle sequence bit.
Set toggle
EP
x
{
x
=a,b,c,d}Control.ToggleSet
Sets the toggle sequence bit.
Clear toggle
EP
x
{
x
=a,b,c,d}Control.ToggleClr
Clears the toggle sequence bit.
Forced NAK response
EP
x
{
x
=a,b,c,d}Control.ForceNAK
Returns a NAK response to a transaction regardless of the
number of data or vacancies in the FIFO region.
STALL response
EP
x
{
x
=a,b,c,d}Control.ForceSTALL
Returns a STALL response to the transaction.
Transaction status
EP
x
{
x
=a,b,c,d}IntStat.OUT_ShortACK,
EP
x
{
x
=a,b,c,d}IntStat.IN_TranACK,
EP
x
{
x
=a,b,c,d}IntStat.OUT_TranACK,
EP
x
{
x
=a,b,c,d}IntStat.IN_TranNAK,
EP
x
{
x
=a,b,c,d}IntStat.OUT_TranNAK,
EP
x
{
x
=a,b,c,d}IntStat.IN_TranErr,
EP
x
{
x
=a,b,c,d}IntStat.OUT_TranErr
Indicates the result of the transaction.