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
240 of 523
NXP Semiconductors
UM10462
Chapter 11: LPC11U3x/2x/1x USB2.0 device controller
•
Set the STALL bit of both buffer 0 and buffer 1 to 0.
•
Read the buffer in use bit for this endpoint.
•
Set the toggle reset bit (TR) to 1 and set the toggle value bit (TV) to 0 for the buffer
indicated by the buffer in use bit.
11.7.5.4 Set configuration
When a SetConfiguration request is received with a configuration value different from
zero, the device software must enable all endpoints that will be used in this configuration
and reset all the toggle values. To do so, it must generate the procedure explained in
for every endpoint that will be used in this configuration.
For all endpoints that are not used in this configuration, it must set the Disabled bit (D) to
one.
11.7.6 USB wake-up
11.7.6.1 Waking up from Deep-sleep and Power-down modes on USB activity
To allow the LPC11U3x/2x/1x to wake up from Deep-sleep or Power-down mode on USB
activity, complete the following steps:
1. Set bit AP_CLK in the USBCLKCTRL register (
) to 0 (default) to enable
automatic control of the USB need_clock signal.
2. Wait until USB activity is suspended by polling the DSUS bit in the DSVCMD_STAT
register (DSUS = 1).
3. The USB need_clock signal will be deasserted after another 2 ms. Poll the
USBCLKST register until the USB need_clock status bit is 0 (
).
4. Once the USBCLKST register returns 0, enable the USB activity wake-up interrupt in
the NVIC (# 30) and clear it.
5. Set bit 1 in the USBCLKCTRL register to 1 to trigger the USB activity wake-up
interrupt on the rising edge of the USB need_clock signal.
6. Enable the wake-up from Deep-sleep or Power-down modes on this interrupt by
enabling the USB need_clock signal in the STARTERP1 register (
7. Enter Deep-sleep or Power-down modes by writing to the PCON register.
8. Execute a WFI instruction.
The LPC11U3x/2x/1x will automatically wake up and resume execution on USB activity.
11.7.6.2 Remote wake-up
To issue a remote wake-up when the USB activity is suspended, complete the following
steps:
1. Set bit AP_CLK in the USBCLKCTRL register to 0 (
, default) to enable
automatic control of the USB need_clock signal.
2. When it is time to issue a remote wake-up, turn on the USB clock and enable the USB
clock source.
3. Force the USB clock on by writing a 1 to bit AP_CLK (
, bit 0) in the
USBCLKCTRL register.
4. Write a 0 to the DSUS bit in the DSVCMD_STAT register.