
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
226 of 808
NXP Semiconductors
UM10360
Chapter 11: LPC17xx USB device controller
If the software clears RD_EN before the entire packet is read, reading is terminated, and
the data remains in the endpoint’s buffer. When RD_EN is set again for this endpoint, the
data will be read from the beginning.
14.3 Data transfer for IN endpoints
When writing data to an endpoint buffer, WR_EN (
Section 11–10.5.5 “USB Control
register (USBCtrl - 0x5000 C228)”
) is set and software writes to the number of bytes it is
going to send in the packet to the USBTxPLen register (
). It can then
write data continuously in the USBTxData register.
When the number of bytes programmed in USBTxPLen have been written to USBTxData,
the WR_EN bit is cleared, and the TxENDPKT bit is set in the USBDevIntSt register.
Software issues a Validate Buffer (
Section 11–12.14 “Validate Buffer (Command: 0xFA,
) command. The endpoint is now ready to send the packet. For IN
isochronous endpoints, the data in the buffer will be sent only if the buffer is validated
before the next FRAME interrupt occurs; otherwise, an empty packet will be sent in the
next frame. If the software clears WR_EN before the entire packet is written, writing will
start again from the beginning the next time WR_EN is set for this endpoint.
Both RD_EN and WR_EN can be high at the same time for the same logical endpoint.
Interleaved read and write operation is possible.
15. DMA operation
In DMA mode, the DMA transfers data between RAM and the endpoint buffer.
The following sections discuss DMA mode operation. Background information is given in
sections
Section 11–15.2 “USB device communication area”
. The fields of the DMA Descriptor are described in
. The last three sections describe DMA operation:
11–15.5 “Non-isochronous endpoint operation”
,
Section 11–15.6 “Isochronous endpoint
, and
Section 11–15.7 “Auto Length Transfer Extraction (ATLE) mode
.
15.1 Transfer terminology
Within this section three types of transfers are mentioned:
1. USB transfers – transfer of data over the USB bus. The USB 2.0 specification refers
to these simply as transfers. Within this section they are referred to as USB transfers
to distinguish them from DMA transfers. A USB transfer is composed of transactions.
Each transaction is composed of packets.
2. DMA transfers – the transfer of data between an endpoint buffer and system memory
(RAM).
3. Packet transfers – in this section, a packet transfer refers to the transfer of a packet of
data between an endpoint buffer and system memory (RAM). A DMA transfer is
composed of one or more packet transfers.