
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
201 of 808
NXP Semiconductors
UM10360
Chapter 11: LPC17xx USB device controller
USBReEp |= (UInt32) ((0x1 << endpt));
/* Load Endpoint index Reg with physical endpoint no.*/
USBEpIn = (UInt32) endpointnumber;
/* load the max packet size Register */
USBEpMaxPSize = MPS;
/* check whether the EP_RLZED bit in the Device Interrupt Status register is set
*/
while (!(USBDevIntSt & EP_RLZED))
{
/* wait until endpoint realization is complete */
}
/* Clear the EP_RLZED bit */
Clear EP_RLZED bit in USBDevIntSt;
}
The device will not respond to any transactions to unrealized endpoints. The SIE
Configure Device command will only cause realized and enabled endpoints to respond to
transactions. For details see
.
10.4.3 USB Endpoint Index register (USBEpIn - 0x5000 C248)
Each endpoint has a register carrying the MaxPacketSize value for that endpoint. This is
in fact a register array. Hence before writing, this register is addressed through the
USBEpIn register.
The USBEpIn register will hold the physical endpoint number. Writing to USBMaxPSize
will set the array element pointed to by USBEpIn. USBEpIn is a write only register.
10.4.4 USB MaxPacketSize register (USBMaxPSize - 0x5000 C24C)
On reset, the control endpoint is assigned the maximum packet size of 8 bytes. Other
endpoints are assigned 0. Modifying USBMaxPSize will cause the endpoint buffer
addresses within the EP_RAM to be recalculated. This is a multi-cycle process. At the
end, the EP_RLZED bit will be set in USBDevIntSt (
). USBMaxPSize array
indexing is shown in
. USBMaxPSize is a read/write register.
[1]
Reset value for EP0 and EP1. All other endpoints have a reset value of 0x0.
Table 191. USB Endpoint Index register (USBEpIn - address 0x5000 C248) bit description
Bit
Symbol
Description
Reset value
4:0
PHY_EP
Physical endpoint number (0-31)
0
31:5
-
Reserved, user software should not write ones to reserved
bits. The value read from a reserved bit is not defined.
NA
Table 192. USB MaxPacketSize register (USBMaxPSize - address 0x5000 C24C) bit
description
Bit
Symbol
Description
Reset value
9:0
MPS
The maximum packet size value.
0x008
31:10
-
Reserved, user software should not write ones to reserved
bits. The value read from a reserved bit is not defined.
NA