
iXPeRiPheRaLMoDuLes7(usB):usBFunCtionContRoLLeR(usB)
s1C33L17teChniCaLManuaL
ePson
iX-1-13
IX
USB
Controltransfer
Control transfer on the EP0 endpoint is controlled as a combination of a number of discrete transactions. Figure
IX.1.4.1.4 illustrates how control transfer is executed for an OUT data stage.
(a) The host starts control transfer in a SETUP transaction. The device's firmware analyzes the request contents
to prepare for responding to a data stage.
(b) The host issues an OUT transaction and executes a data stage, and the device receives data.
(c) The host issues an IN transaction and executes a status stage, and the device returns a zero-length data
packet.
Control transfer without a data stage is executed as in this example but without the data stage.
Transition to a status stage is triggered by an issuance of a transaction by the host whose direction is opposite to
that of the data stage. Have your firmware monitor an IN_TranNAK status (EP0IntStat.IN_TranNAK bit) as a
trigger to transit to a status stage from a data stage.
a
b
c
HosttoDevice
DevicetoHost
FigureIX.1.4.1.4ControlTransferHavinganOUTDataStage
Figure IX.1.4.1.5 illustrates how control transfer is executed for an IN data stage.
(a) The host starts control transfer in a SETUP transaction. The device's firmware analyzes the request contents
to prepare for responding to a data stage.
(b) The host issues an IN transaction and executes a data stage, and the device transmits data.
(c) The host issues an OUT transaction and executes a status stage, and the device returns an ACK response.
Transition to a status stage is triggered by an issuance of a transaction by the host whose direction is opposite to
that of the data stage. Have your firmware monitor an OUT_TranNAK status (EP0IntStat.OUT_TranNAK bit)
as a trigger to transit to a status stage from a data stage.
a
b
c
HosttoDevice
DevicetoHost
FigureIX.1.4.1.5ControlTransferHavinganINDataStage
Since status and data stages in control transfer execute ordinary OUT and IN transactions, flow control using
NAK responses works effectively. The device is allowed to prepare for returning responses within a specified
time frame.