![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 704](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_1721827704.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
704 of 1441
NXP Semiconductors
UM10503
Chapter 25: LPC43xx/LPC43Sxx USB0 Host/Device/OTG controller
Remark:
Before resume signaling can be used, the host must enable it by using the Set
Feature command defined in
USB Device Framework (chapter 9) of the USB 2.0
Specification
.
25.10.5 Managing endpoints
The
USB 2.0 specification
defines an endpoint, also called a device endpoint or an
address endpoint as a uniquely addressable portion of a USB device that can source or
sink data in a communications channel between the host and the device. The endpoint
address is specified by the combination of the endpoint number and the endpoint
direction.
The channel between the host and an endpoint at a specific device represents a data
pipe. Endpoint 0 for a device is always a control type data channel used for device
discovery and enumeration. Other types of endpoints supported by USB include bulk,
interrupt, and isochronous. Each endpoint type has specific behavior related to packet
response and error handling. More detail on endpoint operation can be found in the
USB
2.0 specification
.
The LPC43xx USB0 controller supports up to six endpoints.
Each endpoint direction is essentially independent and can be configured with differing
behavior in each direction. For example, the DCD can configure endpoint 1-IN to be a bulk
endpoint and endpoint 1- OUT to be an isochronous endpoint. This helps to conserve the
total number of endpoints required for device operation. The only exception is that control
endpoints must use both directions on a single endpoint number to function as a control
endpoint. Endpoint 0 , for example, is always a control endpoint and uses both directions.
Each endpoint direction requires a queue head allocated in memory. For is 6 endpoint
numbers, one queue head for each endpoint direction is used by the device controller for
a total of 12 queue heads. The operation of an endpoint and the use of queue heads are
described later in this document.
25.10.5.1 Endpoint initialization
After hardware reset, all endpoints except endpoint zero are un-initialized and disabled.
The DCD must configure and enable each endpoint by writing to the RXE or TXE bit in the
ENDPTCTRLx register (see
). Each 32-bit ENDPTCTRLx is split into an upper
and lower half. The lower half of ENDPTCTRLx is used to configure the receive or OUT
endpoint and the upper half is likewise used to configure the corresponding transmit or IN
endpoint. Control endpoints must be configured the same in both the upper and lower half
of the ENDPTCTRLx register otherwise the behavior is undefined. The following table
shows how to construct a configuration word for endpoint initialization.
Table 510. Device controller endpoint initialization
Field
Value
Data Toggle Reset
1
Data Toggle Inhibit
0
Endpoint Type
00 - control
01 - isochronous