![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 714](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_1721827714.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
714 of 1441
NXP Semiconductors
UM10503
Chapter 25: LPC43xx/LPC43Sxx USB0 Host/Device/OTG controller
25.10.10 Managing queue heads
The device queue head (dQH) points to the linked list of transfer tasks, each depicted by
the device Transfer Descriptor (dTD). An area of memory pointed to by
ENDPOINTLISTADDR contains a group of all dQH’s in a sequential list as shown in
. The even elements in the list of dQH’s are used for receive endpoints (OUT)
and the odd elements are used for transmit endpoints (IN). Device transfer descriptors are
linked head to tail starting at the queue head and ending at a terminate bit. Once the dTD
has been retired, it will no longer be part of the linked list from the queue head. Therefore,
software is required to track all transfer descriptors since pointers will no longer exist
within the queue head once the dTD is retired (see
In addition to the current and next pointers and the dTD overlay examined in section
, the dQH also contains the following parameters for the associated
endpoint: Multiplier, Maximum Packet Length, Interrupt On Setup. The complete
initialization of the dQH including these fields is demonstrated in the next section.
25.10.10.1 Queue head initialization
Initialize one pair of device queue heads for the control endpoint. For each non-control
endpoint direction used, initialize one queue head.To initialize a device queue head, follow
these steps:
•
Write the wMaxPacketSize field as required by the
USB 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 by the bandwidth and in
accordance with the
USB Chapter 9 protocol
. Note: In FS mode, the multiplier field
can only be 1 for ISO endpoints.
•
Write the next dTD Terminate bit field to “1”.
Fig 71. Endpoint queue head diagram
Endpoint dQH1 - Out
Endpoint dQH0 - In
Endpoint dQH0 - Out
ENDPOINTLISTADDR
Endpoint Queue Heads
dQH
Endpoint Transfer
Descriptors dTD
TRANSFER
BUFFER
TRANSFER
BUFFER
TRANSFER
BUFFER
TRANSFER
BUFFER
dTD
dTD
dTD
dTD
transfer buffer
pointer
transfer buffer
pointer
transfer buffer
pointer
transfer buffer
pointer