UM10360 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2013. All rights reserved.
User manual Rev. 3 — 19 December 2013 214 of 841
11.1 How to read this chapter
This chapter describes the USB controller which is present on all LPC176x/5x devices
except the LPC1767. On some LPC176x/5x family devices, the USB controller can also
be configured for Host or OTG operation.
11.2 Basic configuration
The USB controller is configured using the following registers:
1. Power: In the PCONP register (Table 46
), set bit PCUSB.
Remark: On reset, the USB block is disabled (PCUSB = 0).
2. Clock: The USB block can be used with a dedicated USB PLL (PLL1) to obtain the
USB clock or with the Main PLL (PLL0). See Section 4.6.1
.
3. Pins: Select USB pins and their modes in PINSEL0 to PINSEL5 and PINMODE0 to
PINMODE5 (Section 8.5
).
4. Wake-up: Activity on the USB bus port can wake up the microcontroller from
Power-down mode, see Section 4.8.8
.
5. Interrupts: Interrupts are enabled in the NVIC using the appropriate Interrupt Set
Enable register.
6. Initialization: see Section 11.13
.
11.3 Introduction
The Universal Serial Bus (USB) is a four-wire bus that supports communication between a
host and one or more (up to 127) peripherals. The host controller allocates the USB
bandwidth to attached devices through a token-based protocol. The bus supports hot
plugging and dynamic configuration of the devices. All transactions are initiated by the
host controller.
The host schedules transactions in 1 ms frames. Each frame contains a Start-Of-Frame
(SOF) marker and transactions that transfer data to or from device endpoints. Each device
can have a maximum of 16 logical or 32 physical endpoints. There are four types of
transfers defined for the endpoints. Control transfers are used to configure the device.
Interrupt transfers are used for periodic data transfer. Bulk transfers are used when the
rate of transfer is not critical. Isochronous transfers have guaranteed delivery time but no
error correction.
For more information on the Universal Serial Bus, see the USB Implementers Forum
website.
The USB device controller on the LPC176x/5x enables full-speed (12 Mb/s) data
exchange with a USB host controller.
UM10360
Chapter 11: LPC176x/5x USB device controller
Rev. 3 — 19 December 2013 User manual