UM10237_2 © NXP B.V. 2008. All rights reserved.
User manual Rev. 02 — 19 December 2008 782 o f 792
NXP Semiconductors UM10237
Chapter 36: LPC24XX Supplementary information
11.5 Read T est Register (Command: 0xFD, Data: read
2 bytes). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
11.6 Set Device Status (Command: 0xFE, Data: write 1
byte) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
11.7 Get Device Status (Command: 0xFE, Data: read 1
byte) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
11.8 Get Error Code (Command: 0xFF, Data: read 1
byte) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
11.9 Read Error Status (Command: 0xFB, Data: read 1
byte) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
11.10 Select Endpoint (Command: 0x00 - 0x1F, Data:
read 1 byte (optional)) . . . . . . . . . . . . . . . . . 368
11.11 Select Endpoint/Clear Interrupt (Command:
0x40 - 0x5F, Data: read 1 byte) . . . . . . . . . . 369
11.12 Set Endpoint Status (Command: 0x40 - 0x55,
Data: write 1 byte (optional)). . . . . . . . . . . . . 369
11.13 Clear Buffer (Command: 0xF2, Data: read 1 byte
(optional)) . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
11.14 Validate Buffer (Command: 0xFA, Data: none). . .
370
12 USB device controller initialization . . . . . . . 371
13 Slave mode operation . . . . . . . . . . . . . . . . . . 372
13.1 Interrupt generation . . . . . . . . . . . . . . . . . . . 372
13.2 Data transfer for OUT endpoints. . . . . . . . . . 372
13.3 Data transfer for IN endpoints. . . . . . . . . . . . 373
14 DMA operation . . . . . . . . . . . . . . . . . . . . . . . . 373
14.1 Transfer terminology. . . . . . . . . . . . . . . . . . . 373
14.2 USB device communication area . . . . . . . . . 374
14.3 Triggering the DMA engine. . . . . . . . . . . . . . 374
14.4 The DMA descriptor . . . . . . . . . . . . . . . . . . . 375
14.4.1 Next_DD_pointer . . . . . . . . . . . . . . . . . . . . . 376
14.4.2 DMA_mode. . . . . . . . . . . . . . . . . . . . . . . . . . 376
14.4.3 Next_DD_valid . . . . . . . . . . . . . . . . . . . . . . . 376
14.4.4 Isochronous_endpoint . . . . . . . . . . . . . . . . . 376
14.4.5 Max_packet_size . . . . . . . . . . . . . . . . . . . . . 376
14.4.6 DMA_buffer_length. . . . . . . . . . . . . . . . . . . . 377
14.4.7 DMA_buffer_start_addr . . . . . . . . . . . . . . . . 377
14.4.8 DD_retired . . . . . . . . . . . . . . . . . . . . . . . . . . 377
14.4.9 DD_status . . . . . . . . . . . . . . . . . . . . . . . . . . 377
14.4.10 Packet_valid. . . . . . . . . . . . . . . . . . . . . . . . . 377
14.4.11 LS_byte_extracted. . . . . . . . . . . . . . . . . . . . 378
14.4.12 MS_byte_extracted . . . . . . . . . . . . . . . . . . . 378
14.4.13 Present_DMA_count . . . . . . . . . . . . . . . . . . 378
14.4.14 Message_length_position . . . . . . . . . . . . . . 378
14.4.15 Isochronous_packetsize_memory_address. 378
14.5 Non-isochronous endpoint operation. . . . . . 378
14.5.1 Setting up DMA transfers. . . . . . . . . . . . . . . 378
14.5.2 Finding DMA Descriptor. . . . . . . . . . . . . . . . 378
14.5.3 Transferring the data . . . . . . . . . . . . . . . . . . 379
14.5.4 Optimizing descriptor fetch . . . . . . . . . . . . . 379
14.5.5 Ending the packet transfer. . . . . . . . . . . . . . 379
14.5.6 No_Packet DD . . . . . . . . . . . . . . . . . . . . . . . 380
14.6 Isochronous endpoint operation. . . . . . . . . . 380
14.6.1 Setting up DMA transfers. . . . . . . . . . . . . . . 380
14.6.2 Finding the DMA Descriptor. . . . . . . . . . . . . 380
14.6.3 Transferring the Data. . . . . . . . . . . . . . . . . . 380
OUT endpoints. . . . . . . . . . . . . . . . . . . . . . . .381
IN endpoints. . . . . . . . . . . . . . . . . . . . . . . . . .381
14.6.4 DMA descriptor completion . . . . . . . . . . . . . 381
14.6.5 Isochronous OUT Endpoint Operation
Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
14.7 Auto Length Transfer Extraction (ATLE) mode
operation . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
OUT transfers in ATLE mode. . . . . . . . . . . . .382
IN transfers in ATLE mode. . . . . . . . . . . . . . .384
14.7.1 Setting up the DMA transfer. . . . . . . . . . . . . 384
14.7.2 Finding the DMA Descriptor. . . . . . . . . . . . . 384
14.7.3 Transferring the Data. . . . . . . . . . . . . . . . . . 384
OUT endpoints. . . . . . . . . . . . . . . . . . . . . . . .384
IN endpoints. . . . . . . . . . . . . . . . . . . . . . . . . .384
14.7.4 Ending the packet transfer. . . . . . . . . . . . . . 385
OUT endpoints. . . . . . . . . . . . . . . . . . . . . . . .385
IN endpoints. . . . . . . . . . . . . . . . . . . . . . . . . .385
15 Double buffered endpoint operation . . . . . . 385
15.1 Bulk endpoints . . . . . . . . . . . . . . . . . . . . . . . 385
15.2 Isochronous endpoints. . . . . . . . . . . . . . . . . 387
Chapter 14: LPC24XX USB Host controller
1 Basic configuration. . . . . . . . . . . . . . . . . . . . 388
2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 388
2.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
2.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 389
3 Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
3.1 Pin description . . . . . . . . . . . . . . . . . . . . . . . 389
3.1.1 USB host usage note . . . . . . . . . . . . . . . . . . 390
3.2 Software interface . . . . . . . . . . . . . . . . . . . . 390
3.2.1 Register map . . . . . . . . . . . . . . . . . . . . . . . . 390
3.2.2 USB Host Register Definitions . . . . . . . . . . . 392
Chapter 15: LPC24XX USB OTG controller
1 Basic configuration. . . . . . . . . . . . . . . . . . . . 393
2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 393
3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
4 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 393
5 Modes of operation . . . . . . . . . . . . . . . . . . . . 394
6 Pin configuration. . . . . . . . . . . . . . . . . . . . . . 394
6.1 Connecting port U1 to an external OTG
transceiver . . . . . . . . . . . . . . . . . . . . . . . . . . 395
6.2 Connecting USB as a two-port host. . . . . . . 398
6.3 Connecting USB as one port host and one port
device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
7 Register description . . . . . . . . . . . . . . . . . . . 399
7.1 USB Interrupt Status Register (USBIntSt -
0xE01F C1C0). . . . . . . . . . . . . . . . . . . . . . . 400
7.2 OTG Interrupt Status Register (OTGIntSt -
0xE01F C100) . . . . . . . . . . . . . . . . . . . . . . . 401