
iXPeRiPheRaLMoDuLes7(usB):usBFunCtionContRoLLeR(usB)
iX-1-10
ePson
s1C33L17teChniCaLManuaL
Table IX.1.4.1.4 lists control items and statuses related to transaction processing on the EPa, EPb, EPc, and EPd
endpoints.
TableIX.1.4.1.4ControlItemsandStatusesforEndpointsEPa,EPb,EPc,andEPd
Register/bit
EPx{x=a,b,c,d}Control.AutoForceNAK
EPx{x=a,b,c,d}Control.EnShortPkt
EPx{x=a,b,c,d}Control.
DisAF_NAK_Short
EPx{x=a,b,c,d}Control.ToggleStat
EPx{x=a,b,c,d}Control.ToggleSet
EPx{x=a,b,c,d}Control.ToggleClr
EPx{x=a,b,c,d}Control.ForceNAK
EPx{x=a,b,c,d}Control.ForceSTALL
EPx{x=a,b,c,d}IntStat.OUT_ShortACK,
EPx{x=a,b,c,d}IntStat.IN_TranACK,
EPx{x=a,b,c,d}IntStat.OUT_TranACK,
EPx{x=a,b,c,d}IntStat.IN_TranNAK,
EPx{x=a,b,c,d}IntStat.OUT_TranNAK,
EPx{x=a,b,c,d}IntStat.IN_TranErr,
EPx{x=a,b,c,d}IntStat.OUT_TranErr
Description
Setstheendpoint'sEPx{x=a,b,c,d}Control.ForceNAK
bitwheneveranOUTtransactioniscompleted.
Enablestransmissionofshortpacketsthatareunder
themaximumpacketsizeforINtransactions.This
settingisclearedaftertheINtransactionthathas
transmittedashortpacketiscompleted.
InOUTtransactions,receptionofashortpacket
automaticallydisablesthefunctionthatsetsthe
endpoint'sEPx{x=a,b,c,d}Control.ForceNAKbit.
Indicatesthestateofthetogglesequencebit.
Setsthetogglesequencebit.
Clearsthetogglesequencebit.
ReturnsaNAKresponsetoatransactionregardlessof
thenumberofdataorvacanciesintheFIFOregion.
ReturnsaSTALLresponsetothetransaction.
Indicatestheresultofthetransaction.
item
Setautomatic
ForceNAK
Enableshortpacket
transmission
Disableautomatic
ForceNAKsetting
uponshortpacket
reception
Togglesequencebit
Settoggle
Cleartoggle
ForcedNAK
response
STALLresponse
Transactionstatus
setuPtransaction
The SETUP transaction addressed to the EP0 endpoint of the macro's own node is automatically executed. (The
USB function must be enabled for this to happen.)
When a SETUP transaction is issued, all the contents of the data packet (8 bytes) are stored in the registers
EP0Setup_0 through EP0Setup_7, followed by an ACK response. Meanwhile, a RcvEP0SETUP status is issued
to the firmware.
If an error occurs during a SETUP transaction, no response or status is issued.
When the SETUP transaction is completed, the ForceNAK bit of the EP0ControlIN and EP0ControlOUT
registers are set and the ForceSTALL bit is cleared. The ToggleStat bit is also set. After the firmware completes
setting the EP0 endpoint and becomes ready to proceed to the next stage, clear the ForceNAK bit of the relevant
direction in the EP0ControlIN or EP0ControlOUT register.
Figure IX.1.4.1.1 illustrates how the SETUP transaction is executed.
(a) The host issues a SETUP token addressed to the EP0 endpoint of this node.
(b) Next, the host sends an 8-byte long data packet. The macro writes these data in the EP0Setup_0 through
EP0Setup_7 registers.
(c) The macro automatically returns an ACK response. In addition, it sets registers to be automatically set up
and issues a status to the firmware.
SETUP
a
ACK
c
DATA
b
HosttoDevice
DevicetoHost
FigureIX.1.4.1.1SETUPTransaction