UM10462
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 5.5 — 21 December 2016
238 of 523
NXP Semiconductors
UM10462
Chapter 11: LPC11U3x/2x/1x USB2.0 device controller
11.7.3 Generic endpoint: single-buffering
To enable single-buffering, software must set the corresponding "USB EP Buffer Config"
bit to zero. In the "USB EP Buffer in use" register, software can indicate which buffer is
used in this case.
When software wants to transfer data, it programs the different bits in the Endpoint
command/status entry and sets the active bits. The hardware will transmit/receive multiple
packets for this endpoint until the NBytes value is equal to zero. When NBytes goes to
zero, hardware clears the active bit and sets the corresponding interrupt status bit.
Fig 24. Flowchart of control endpoint 0 - IN direction
Wait on EP 0In interrupt
EP0In
Interrupt = ‘1’ ?
- Clear EP0In interrupt
Yes
No
All IN data transmitted ?
- Write EP0IN( Active = ‘1’
Stall = ‘1’*
NBytes)
No
Yes
IN data phase
on-going ?
Yes
No
- Write EP0IN( Active = ‘0’
Stall = ‘1’)
OUT data phase
on-going ?
No
- Write EP0IN( Active = ‘1’
Stall = ‘1’
0 Bytes )
- Write EP0OUT(
Active = ‘0’
Stall = ‘1’)
- Clear EP0OUT interrupt
Yes
* : STALL bit must only be set when it is the last packet during the data phase for this Control Transfer
EP0Out Interrupt ?
No
Host aborts Control Read
Yes
- Write EP0OUT(
Active = ‘1’
Stall = ‘1’
0 Bytes )
- Write EP0IN (
Active = ‘0’
Stall = ‘1’)
- Clear EP0Out interrupt
If not all OUT data transferred , the
host aborts Control Write .
Otherwise it is a normal completion
by the host