UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User manual
Rev. 1.3 — 6 July 2012
576 of 1269
NXP Semiconductors
UM10503
Chapter 23: LPC43xx USB0 Host/Device/OTG controller
•
Write the Active bit in the status field to “0”.
•
Write the Halt bit in the status field to “0”.
Remark:
The DCD must only modify dQH if the associated endpoint is not primed and
there are no outstanding dTD’s.
23.10.10.2 Operational model for setup transfers
As discussed in section Control Endpoint Operational Model (
), a setup
transfer requires special 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 handle the setup transfer
as demonstrated here:
1. Copy the setup buffer contents from dQH - RX to software buffer.
2. Acknowledge setup backup by writing a “1” to the corresponding bit in
ENDPTSETUPSTAT.
Remark:
The acknowledge must occur before continuing to process the setup packet.
Remark:
After the acknowledge has occurred, the DCD must not attempt to access
the setup buffer in the dQH – RX. Only the local software copy should be examined.
3. Check for pending data or status dTD’s from previous control transfers and flush if any
exist as discussed in section Flushing/De-priming an Endpoint.
Remark:
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. Decode setup packet and prepare data phase [optional] and status phase transfer as
require by the
USB Specification Chapter 9
or application specific protocol.
23.10.11 Managing transfers with transfer descriptors
23.10.11.1 Software link pointers
It is necessary for the DCD software to maintain head and tail pointers to the linked list of
dTDs for each respective queue head. This is necessary because the dQH only maintains
pointers to the current working dTD and the next dTD to be executed. The operations
described in following sections for managing dTD will assume the DCD can reference the
head and tail of the dTD linked list.
Remark:
To conserve memory, the reserved fields at the end of the dQH can be used to
store the Head & Tail pointers but it still remains the responsibility of the DCD to maintain
the pointers.