USB Transactions
13-68
Non-autodecoded control read and control write transfers are sets of transac-
tions that occur on endpoint 0, have specific USB protocol meaning, and are
not handled automatically by the core. The USB function block automatically
provides an ACK handshake for the setup stage transaction, but the data and
status stage transaction handshaking is accomplished using the normal RX
and TX control bits that affect transaction handshaking. A general USB inter-
rupt to the local host occurs at the end of each transaction of each stage of a
control transfer. The local host must perform the following actions to act on
non-autodecoded control transfers:
-
Process the setup phase USB interrupt. The local host reads the control
transfer command from the setup FIFO and decodes the command. For
control reads, the local host fetches the requested read data and places
it (or as much of the read data as will fit) into the endpoint 0 FIFO, then
enables the endpoint 0 FIFO. For control writes, the local host code only
enables the endpoint 0 FIFO. Local host code also sets any flags needed
for processing endpoint 0 USB interrupts during the control transfer.
-
Process the data phase endpoint 0 general USB interrupt(s). For control
reads, the data phase general USB endpoint 0 TX interrupt indicates that
the previously provided transmit data has been sent. Any additional data
must be written to the endpoint 0 FIFO. For control writes, the write data
must be pulled from the endpoint 0 FIFO, and, when all control write data
is available, interpret the write data and act on the write request. After han-
dling the last data phase interrupt, the local host must set the endpoint 0
control bits to signal the desired stage status to the host.
-
Process the status stage endpoint 0 general USB interrupt. The local
host provides its completion status back to the USB host during this stage,
either via status in the data phase of the transaction (for control write
transfers) or via the handshake phase of the transaction (for control read
transfers).
Autodecoded control read and control write transfers are sets of transactions
that occur on endpoint 0, have specific USB protocol meaning, and are han-
dled automatically by the USB function block without any intervention by the
local host. The USB function block handles all handshaking automatically and
without regard to the endpoint 0 control bits that affect normal (non-control
transfer) transaction handshaking. No interrupt is asserted to the local host
during autodecoded control transfers.
If no request defined by the USB1.1 specification is associated with the data
of the setup phase, the request is stalled by the core and the local host is not
informed of its occurrence (autodecoded).