Nxp semiconductors – NXP Semiconductors LPC24XX UM10237 User Manual

Page 782

Advertising
background image

UM10237_4

© NXP B.V. 2009. All rights reserved.

User manual

Rev. 04 — 26 August 2009

782 of 792

NXP Semiconductors

UM10237

Chapter 36: LPC24XX Supplementary information

Slave mode. . . . . . . . . . . . . . . . . . . . . . . . . . .360
DMA mode . . . . . . . . . . . . . . . . . . . . . . . . . . .361

11

Serial interface engine command
description . . . . . . . . . . . . . . . . . . . . . . . . . . . 363

11.1

Set Address (Command: 0xD0, Data:
write 1 byte) . . . . . . . . . . . . . . . . . . . . . . . . . 364

11.2

Configure Device (Command: 0xD8, Data: write 1
byte) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364

11.3

Set Mode (Command: 0xF3, Data:
write 1 byte) . . . . . . . . . . . . . . . . . . . . . . . . . 365

11.4

Read Current Frame Number (Command: 0xF5,
Data: read 1 or 2 bytes) . . . . . . . . . . . . . . . . 366

11.5

Read Test Register (Command: 0xFD, Data: read
2 bytes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366

11.6

Set Device Status (Command: 0xFE, Data: write 1
byte) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366

11.7

Get Device Status (Command: 0xFE, Data: read 1
byte) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

11.8

Get Error Code (Command: 0xFF, Data: read 1
byte) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

11.9

Read Error Status (Command: 0xFB, Data: read 1
byte) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368

11.10

Select Endpoint (Command: 0x00 - 0x1F, Data:
read 1 byte (optional)) . . . . . . . . . . . . . . . . . 369

11.11

Select Endpoint/Clear Interrupt (Command:
0x40 - 0x5F, Data: read 1 byte) . . . . . . . . . . 370

11.12

Set Endpoint Status (Command: 0x40 - 0x55,
Data: write 1 byte (optional)). . . . . . . . . . . . . 370

11.13

Clear Buffer (Command: 0xF2, Data: read 1 byte
(optional)) . . . . . . . . . . . . . . . . . . . . . . . . . . . 371

11.14

Validate Buffer (Command: 0xFA, Data:
none) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371

12

USB device controller initialization . . . . . . . 372

13

Slave mode operation . . . . . . . . . . . . . . . . . . 373

13.1

Interrupt generation . . . . . . . . . . . . . . . . . . . 373

13.2

Data transfer for OUT endpoints. . . . . . . . . . 373

13.3

Data transfer for IN endpoints. . . . . . . . . . . . 374

14

DMA operation . . . . . . . . . . . . . . . . . . . . . . . . 374

14.1

Transfer terminology. . . . . . . . . . . . . . . . . . . 374

14.2

USB device communication area . . . . . . . . . 375

14.3

Triggering the DMA engine. . . . . . . . . . . . . . 375

14.4

The DMA descriptor . . . . . . . . . . . . . . . . . . . 376

14.4.1

Next_DD_pointer . . . . . . . . . . . . . . . . . . . . . 377

14.4.2

DMA_mode. . . . . . . . . . . . . . . . . . . . . . . . . . 377

14.4.3

Next_DD_valid . . . . . . . . . . . . . . . . . . . . . . . 377

14.4.4

Isochronous_endpoint . . . . . . . . . . . . . . . . . 377

14.4.5

Max_packet_size . . . . . . . . . . . . . . . . . . . . . 377

14.4.6

DMA_buffer_length . . . . . . . . . . . . . . . . . . . 378

14.4.7

DMA_buffer_start_addr . . . . . . . . . . . . . . . . 378

14.4.8

DD_retired . . . . . . . . . . . . . . . . . . . . . . . . . . 378

14.4.9

DD_status . . . . . . . . . . . . . . . . . . . . . . . . . . 378

14.4.10

Packet_valid. . . . . . . . . . . . . . . . . . . . . . . . . 378

14.4.11

LS_byte_extracted . . . . . . . . . . . . . . . . . . . . 379

14.4.12

MS_byte_extracted . . . . . . . . . . . . . . . . . . . 379

14.4.13

Present_DMA_count . . . . . . . . . . . . . . . . . . 379

14.4.14

Message_length_position . . . . . . . . . . . . . . 379

14.4.15

Isochronous_packetsize_memory_address. 379

14.5

Non-isochronous endpoint operation . . . . . . 379

14.5.1

Setting up DMA transfers. . . . . . . . . . . . . . . 379

14.5.2

Finding DMA Descriptor. . . . . . . . . . . . . . . . 379

14.5.3

Transferring the data . . . . . . . . . . . . . . . . . . 380

14.5.4

Optimizing descriptor fetch . . . . . . . . . . . . . 380

14.5.5

Ending the packet transfer . . . . . . . . . . . . . . 380

14.5.6

No_Packet DD . . . . . . . . . . . . . . . . . . . . . . . 381

14.6

Isochronous endpoint operation. . . . . . . . . . 381

14.6.1

Setting up DMA transfers. . . . . . . . . . . . . . . 381

14.6.2

Finding the DMA Descriptor. . . . . . . . . . . . . 381

14.6.3

Transferring the Data . . . . . . . . . . . . . . . . . . 381
OUT endpoints. . . . . . . . . . . . . . . . . . . . . . . . 382
IN endpoints. . . . . . . . . . . . . . . . . . . . . . . . . . 382

14.6.4

DMA descriptor completion . . . . . . . . . . . . . 382

14.6.5

Isochronous OUT Endpoint Operation
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382

14.7

Auto Length Transfer Extraction (ATLE) mode
operation . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
OUT transfers in ATLE mode. . . . . . . . . . . . . 383
IN transfers in ATLE mode. . . . . . . . . . . . . . . 385

14.7.1

Setting up the DMA transfer. . . . . . . . . . . . . 385

14.7.2

Finding the DMA Descriptor. . . . . . . . . . . . . 385

14.7.3

Transferring the Data . . . . . . . . . . . . . . . . . . 385
OUT endpoints. . . . . . . . . . . . . . . . . . . . . . . . 385
IN endpoints. . . . . . . . . . . . . . . . . . . . . . . . . . 385

14.7.4

Ending the packet transfer . . . . . . . . . . . . . . 386
OUT endpoints. . . . . . . . . . . . . . . . . . . . . . . . 386
IN endpoints. . . . . . . . . . . . . . . . . . . . . . . . . . 386

15

Double buffered endpoint operation . . . . . . 386

15.1

Bulk endpoints . . . . . . . . . . . . . . . . . . . . . . . 386

15.2

Isochronous endpoints . . . . . . . . . . . . . . . . . 388

Chapter 14: LPC24XX USB Host controller

1

Basic configuration . . . . . . . . . . . . . . . . . . . . 389

2

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 389

2.1

Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389

2.2

Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 390

3

Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390

3.1

Pin description . . . . . . . . . . . . . . . . . . . . . . . 390

3.1.1

USB host usage note . . . . . . . . . . . . . . . . . . 391

3.2

Software interface . . . . . . . . . . . . . . . . . . . . 391

3.2.1

Register map . . . . . . . . . . . . . . . . . . . . . . . . 391

3.2.2

USB Host Register Definitions . . . . . . . . . . . 393

Chapter 15: LPC24XX USB OTG controller

1

Basic configuration . . . . . . . . . . . . . . . . . . . . 394

2

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 394

3

Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394

4

Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 394

Advertising