Download Print this page

Motorola USB08 Reference Manual: Usb Control Register 0 (ucr0)

Universal serial bus evaluation board using the mc68hc908jb8.
Hide thumbs

Advertisement

USB08 Evaluation Board
MOTOROLA
The type of standard request is coded in the field bRequest. For
continuation of the enumeration, the host should send the standard
device request SET_ADDRESS and the handleSETUP() routine should
branch to the function setAddress().
The function first validates the contents of the fields of SetupBuffer. In
the case of an error, a STALL handshake is initiated to give the host
problem feedback.
Before the device address in the field wValue is finally accepted, the
MCU has to prepare the transmission of a receive acknowledgment.
This acknowledgement still is completed using the old device address
zero. An additional safety feature is the mandatory control transfer status
stage.
The handshake takes place via a telegram with a data length of zero,
which is requested by the host by means of an IN transaction. For this
purpose, the length TP0SIZx is defined as zero and the TX0E bit is set
in the USB control register 0 (UCR0). This enables the transmitter of the
endpoint 0.
Bit 7
6
Read:
0
T0SEQ
Write:
Reset:
0
0
= Unimplemented
Figure 4-7. USB Control Register 0 (UCR0)
This handshake transaction always uses a DATA1 packet; therefore,
T0SEQ is set.
The routine setAddress() now returns to handleSETUP() where the
receive interrupt for EP0 is re-enabled. Finally, the MCU terminates the
interrupt service routine isrUSB().
The device address is still located in the SetupBuffer. The service
routine isrUSB() is again activated by a transmit interrupt for EP0. After
decoding, if it was determined that the cause of the interrupt was an IN
Universal Serial Bus (USB) Interface
Universal Serial Bus (USB) Interface
Device Management with Endpoint 0
5
4
3
Tx0E
Rx0E
TP0SIZ3
0
0
0
2
1
Bit 0
TP0SIZ2
TP0SIZ1
TP0SIZ0
0
0
0
Designer Reference Manual
71

Advertisement

This manual also for:

Mc68hc908jb8

Comments to this Manuals

Symbols: 0
Latest comments: