4 device configuration, 5 stall condition, Device configuration – Motorola USB08 User Manual

Page 74: Stall condition, Universal serial bus (usb) interface

Advertising
background image

Designer Reference Manual

USB08 Evaluation Board

74

Universal Serial Bus (USB) Interface

MOTOROLA

Universal Serial Bus (USB) Interface

4.6.4 Device Configuration

After the host processes all descriptors claimed by the device, it will set
up the device with a SET_CONFIGURATION standard device request.
A device can have several configurations (for example, with different
power options, resolutions, or speed options). The configuration
characteristics supported by the device are coded in the device
descriptors.

The reference design is limited to the simplest case with only one
possible configuration. The SET_CONFIGURATION request is passed
on by the routine isrUSB() to handleSETUP(), after which branches to
setConfiguration() take place. The configuration specified by the host is
coded in the field wValue.lo of the structure SetupBuffer. If this field is
larger than zero, the USB08 is ready to be put into operation. For this
purpose, the transmitter of endpoint 1 and the receiver of endpoint 2 will
be enabled and the internal status of the device changed to
CONFIGURED.

In reverse, the host is able to return the device to the status
ADDRESSED by transmission of a SET_CONFIGURATION instruction
with the value 0.

For the status stage of this control transfer, the routine ends by preparing
to send an empty DATA1 packet. This is completed by the following IN
transaction.

4.6.5 STALL Condition

If the device discovers an error during communication via the USB which
requires the involvement of the host, the device sends a STALL packet
in place of the usual handshake packets ACK (ready/OK) or NAK (not
ready).

Advertising