Universal Serial Bus (USB) Interface
Device Management with Endpoint 0
USB08 Evaluation Board
Designer Reference Manual
MOTOROLA
Universal Serial Bus (USB) Interface
73
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
Содержание MC68HC908JB8
Страница 2: ...blank ...
Страница 6: ...Designer Reference Manual USB08 Evaluation Board 6 List of Sections MOTOROLA List of Sections ...
Страница 16: ...Designer Reference Manual USB08 Evaluation Board 16 List of Tables MOTOROLA List of Tables ...
Страница 42: ...Designer Reference Manual USB08 Evaluation Board 42 Hardware Description MOTOROLA Hardware Description ...
Страница 88: ...Designer Reference Manual USB08 Evaluation Board 88 USB08 Descriptors MOTOROLA USB08 Descriptors ...
Страница 243: ...blank ...