Universal Serial Bus (USB) Interface
Device Management with Endpoint 0
USB08 Evaluation Board
Designer Reference Manual
MOTOROLA
Universal Serial Bus (USB) Interface
69
4.6 Device Management with Endpoint 0
4.6.1 Enumeration
After the basic initialization described in the previous paragraphs, the
USB module is now able to react with an interrupt on packets which are
addressed to the control endpoint EP0. Now, the process of the
enumeration (that is, the configuration and integration into the system)
at the USB is continued.
4.6.2 Assignment of the Device Address
In the following step, the host assigns a unique USB address to the
device, which is located in the range from 1 to 127. For this purpose, the
host sends a SET_ADDRESS standard device request. Standard device
requests are always served by the EP0. These transfers are control
transfers which are implemented for the EP0 only (the other endpoints
are used exclusively for the data communication by means of interrupt
transfers).
USB device requests are started, by the host sending a SETUP packet.
The MCU receives this information and generates an EP0 receive
interrupt. In the interrupt service routine isrUSB(), the interrupt is
identified by the controller on the basis of the RXD0F flag in the USB
interrupt register 1 (UIR1).
Since a receive interrupt could be initiated by an OUT packet for the
endpoint EP0, it must be determined whether the received information
Bit 7
6
5
4
3
2
1
Bit 0
Read:
EOPF
RSTF
TXD2F
RXD2F
TXD1F
RESUMF
TXD0F
RXD0F
Write:
Reset:
0
0
0
0
0
0
0
0
= Unimplemented
Figure 4-5. USB Interrupt Register 1 (UIR1)