
UM10375
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 3 — 14 June 2011
363 of 368
NXP Semiconductors
UM10375
Chapter 23: LPC13xx Supplementary information
10.10.1.1 USB Device Interrupt Status register
(USBDevIntSt - 0x4002 0000) . . . . . . . . . . . 143
10.10.1.2 USB Device Interrupt Enable register
(USBDevIntEn - 0x4002 0004) . . . . . . . . . . . 144
10.10.1.3 USB Device Interrupt Clear register
(USBDevIntClr - 0x4002 0008) . . . . . . . . . . . 146
10.10.1.4 USB Device Interrupt Set register (USBDevIntSet
- 0x4002 000C) . . . . . . . . . . . . . . . . . . . . . . . 147
SIE command code registers . . . . . . . . . . . . 149
10.10.2.1 USB Command Code register (USBCmdCode -
0x4001 8010) . . . . . . . . . . . . . . . . . . . . . . . . 149
10.10.2.2 USB Command Data register (USBCmdData -
0x4002 0014) . . . . . . . . . . . . . . . . . . . . . . . . 150
USB data transfer registers . . . . . . . . . . . . . 150
10.10.3.1 USB Receive Data register (USBRxData - 0x4002
0018) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
10.10.3.2 USB Transmit Data register (USBTxData - 0x4002
021C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
10.10.3.3 USB Receive Packet Length register
(USBRxPLen - 0x4002 0020) . . . . . . . . . . . . 150
10.10.3.4 USB Transmit Packet Length register
(USBTxPLen - 0x4002 0024) . . . . . . . . . . . . 151
10.10.3.5 USB Control register (USBCtrl -
0x4002 0028) . . . . . . . . . . . . . . . . . . . . . . . . 151
10.10.3.5.1 Data transfer. . . . . . . . . . . . . . . . . . . . . . . . 152
10.10.4
Miscellaneous registers . . . . . . . . . . . . . . . . 153
10.10.4.1 USB Device FIQ Select register (USBDevFIQSel
- 0x4002 002C) . . . . . . . . . . . . . . . . . . . . . . . 153
byte) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
read 2 bytes) . . . . . . . . . . . . . . . . . . . . . . . . 156
10.11.10 Select Endpoint (Command: 0x00 - 0x09 Data:
read 1 byte (optional)) . . . . . . . . . . . . . . . . . 159
10.11.11 Select Endpoint/Clear Interrupt (Command:
0x40 - 0x47, Data: read 1 byte) . . . . . . . . . . 160
10.11.12 Set Endpoint Status (Command: 0x40 - 0x49,
Data: write 1 byte (optional)) . . . . . . . . . . . . 161
10.11.13 Clear Buffer (Command: 0xF2, Data: read 1 byte
(optional)). . . . . . . . . . . . . . . . . . . . . . . . . . . 161
10.11.14 Validate Buffer (Command: 0xFA, Data:
none) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
USB device controller initialization . . . . . . . 162
USB clock configuration. . . . . . . . . . . . . . . . 162
USB device controller initialization. . . . . . . . 163
Functional description . . . . . . . . . . . . . . . . . 163
Data flow from the Host to the Device . . . . . 163
Data flow from the Device to the Host . . . . . 164
Interrupt based transfer . . . . . . . . . . . . . . . . 164
Isochronous transfer . . . . . . . . . . . . . . . . . . 164
Automatic stall feature . . . . . . . . . . . . . . . . . 165
Double-buffered endpoint operation . . . . . . 165
Bulk endpoints . . . . . . . . . . . . . . . . . . . . . . . 165
Isochronous endpoints . . . . . . . . . . . . . . . . . 167
Chapter 11: LPC13xx USB on-chip drivers
How to read this chapter . . . . . . . . . . . . . . . . 168
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 168
USB driver functions . . . . . . . . . . . . . . . . . . . 168
Clock and pin initialization . . . . . . . . . . . . . . 168
USB initialization. . . . . . . . . . . . . . . . . . . . . . 169
USB connect. . . . . . . . . . . . . . . . . . . . . . . . . 169
USB interrupt handler . . . . . . . . . . . . . . . . . . 169
Calling the USB device driver. . . . . . . . . . . . 169
USB mass storage driver . . . . . . . . . . . . . . . 170
USB human interface driver . . . . . . . . . . . . . 171
USB driver structure definitions. . . . . . . . . . 172
ROM driver table. . . . . . . . . . . . . . . . . . . . . . 172
USB driver table . . . . . . . . . . . . . . . . . . . . . . 172
USB device information . . . . . . . . . . . . . . . . 172
Mass storage device information . . . . . . . . . 173
Human interface device information . . . . . . 174
USB descriptors . . . . . . . . . . . . . . . . . . . . . . 175
Standard descriptor . . . . . . . . . . . . . . . . . . . 175
Example descriptors . . . . . . . . . . . . . . . . . . 178
Example HID descriptor . . . . . . . . . . . . . . . . . 178
Example MSC descriptor . . . . . . . . . . . . . . . . 179
How to read this chapter . . . . . . . . . . . . . . . . 180
Basic configuration . . . . . . . . . . . . . . . . . . . . 180
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Pin description . . . . . . . . . . . . . . . . . . . . . . . 180