UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User manual
Rev. 1.3 — 6 July 2012
579 of 1269
NXP Semiconductors
UM10503
Chapter 23: LPC43xx USB0 Host/Device/OTG controller
23.10.11.5 Flushing an endpoint
It is necessary for the DCD to flush one or more endpoints on a USB device reset or
during a broken control transfer. There may also be application specific requirements to
stop transfers in progress. The following procedure can be used by the DCD to stop a
transfer in progress:
1. Write a ‘1’ to the corresponding bit(s) in ENDPTFLUSH.
2. Wait until all bits in ENDPTFLUSH are ‘0’.
Remark:
Software note: This operation may take a large amount of time depending
on the USB bus activity. It is not desirable to have this wait loop within an interrupt
service routine.
3. Read the ENDPTSTAT register to ensure that for all endpoints commanded to be
flushed the corresponding bits are now ‘0’. If the corresponding bits are ‘1’ after step
#2 has finished, then the flush failed as described in the following:
In very rare cases, a packet is in progress to the particular endpoint when
commanded flush using ENDPTFLUSH. A safeguard is in place to refuse the flush to
ensure that the packet in progress completes successfully. The DCD may need to
repeatedly flush any endpoints that fail to flush by repeating steps 1-3 until each
endpoint is successfully flushed.
23.10.11.6 Device error matrix
summarizes packet errors that are not automatically handled by the device
controller.
The following errors can occur:
Overflow
: Number of bytes received exceeded max. packet size or total buffer length.
This error will also set the Halt bit in the dQH, and if there are dTDs remaining in the
linked list for the endpoint, then those will not be executed.
ISO packet error
: CRC Error on received ISO packet. Contents not guaranteed to be
correct.
ISO fulfillment error
: Host failed to complete the number of packets defined in the dQH
MULT field within the given (micro) frame. For scheduled data delivery the DCD may
need to readjust the data queue because a fulfillment error will cause the device
controller to cease data transfers on the pipe for one (micro) frame. During the “dead”
(micro) frame, the device controller reports error on the pipe and primes for the following
(micro) frame
Table 447. Device error matrix
Error
Direction
Packet type
Data buffer error
bit
Transaction
error bit
Overflow
Rx
Any
1
0
ISO packet error
Rx
ISO
0
1
ISO fulfillment
error
Both
ISO
0
1