Motorola USB08 Reference Manual page 73

Universal serial bus evaluation board using the mc68hc908jb8
Table of Contents

Advertisement

USB08 Evaluation Board
MOTOROLA
Within the setup stage, the function handleSETUP() is called. The
request type is recognized as GET_DESCRIPTOR and branched to the
subfunction getDescriptor(). There, it is determined if a device
configuration or string descriptor was requested. According to this
requirement, a pointer will be set on the respective data source. After
examination of the data length, this data will be written into the USB
endpoint 0 send registers UE0D0–UE0D7.
The number of bytes is limited (at least for low-speed USB devices) to
eight bytes per DATA packet. If more data has to be transferred, the
device has to divide the data into blocks of eight bytes and distribute
these portions using several sequential IN transactions. The last data
block is identified by the host due to a length smaller than eight bytes.
That means, if the length of the transmitted data amounts to an integral
multiple of eight, there has to be an additional empty IN transaction (data
length zero).
The data length and the transmitter release bit TX0E are inserted into the
USB control register 0 (UCR0) (see SET_ADDRESS), then the data is
available for the host to pick up.
If there is only one packet (length smaller eight), the
GET_DESCRIPTOR standard device request is marked as complete
(REQUEST_COMPLETE).
If several packets have to be sent, the send buffer is filled up again by
the routine handleIN() during the following EP0 transmit interrupt, until
all data is sent.
Sequential IN transactions are served with interchanging data packets.
The interchanging between DATA0 and DATA1 packets is called a data
toggle and serves for error protection.
Detailed information about the descriptors used in the reference design
are contained in
Appendix B. USB08
Universal Serial Bus (USB) Interface
Universal Serial Bus (USB) Interface
Device Management with Endpoint 0
Descriptors.
Designer Reference Manual
73

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68hc908jb8

Table of Contents