Freescale Semiconductor MCF5329 Reference Manual page 510

Devices supported: mcf5327; mcf5328; mcf53281; mcf5329
Table of Contents

Advertisement

Universal Serial Bus Interface – On-The-Go Module
21.5.3.5.1
Queue Head Initialization
One pair of device queue heads must be initialized for each active endpoint. To initialize a device queue
head:
Write the wMaxPacketSize field as required by the USB specification chapter 9 or application
specific protocol.
Write the multiplier field to 0 for control, bulk, and interrupt endpoints. For ISO endpoints, set the
multiplier to 1,2, or 3 as required for bandwidth with the USB specification chapter 9 protocol. In
FS mode, the multiplier field can only be 1 for ISO endpoints.
Set the next dTD terminate bit field.
Clear the active bit in the status field.
Clear the halt bit in the status field.
The DCD must only modify dQH if the associated endpoint is not primed
and there are no outstanding dTDs.
21.5.3.5.2
Setup Transfers Operation
As discussed in
Section 21.5.3.4.4, "Control Endpoint Operation,"
treatment by the DCD. A setup transfer does not use a dTD, but instead stores the incoming data from a
setup packet in an 8-byte buffer within the dQH.
Upon receiving notification of the setup packet, the DCD should manage the setup transfer by:
1. Copying setup buffer contents from dQH-RX to software buffer.
2. Acknowledging setup backup by writing a 1 to the corresponding bit in the EPSETUPSR register.
The acknowledge must occur before continuing to process the setup packet.
After acknowledge occurs, DCD must not attempt to access the setup buffer
in dQH-RX. Only local software copy should be examined.
3. Checking for pending data or status dTD's from previous control transfers and flushing if any exist
as discussed in
Section 21.5.3.6.5, "Flushing/De-priming an Endpoint."
It is possible for the device controller to receive setup packets before
previous control transfers complete. Existing control packets in progress
must be flushed and the new control packet completed.
4. Decoding setup packet and prepare data phase (optional) and status phase transfer as required by
the USB specification chapter 9 or application specific protocol.
21-68
NOTE
NOTE
NOTE
MCF5329 Reference Manual, Rev 3
setup transfers require special
Freescale Semiconductor

Advertisement

Table of Contents
loading

Table of Contents