UM10360 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2013. All rights reserved.
User manual Rev. 3 — 19 December 2013 290 of 841
NXP Semiconductors
UM10360
Chapter 13: LPC176x/5x USB OTG
Note that only the subset of B-device HNP states and state transitions supported by
hardware are shown. Software is responsible for implementing all of the HNP states.
Figure 41
may appear to imply that the interrupt bits such as REMOVE_PU should be
polled, but this is not necessary if the corresponding interrupt is enabled.
Following are code examples that show how the actions in Figure 41
are accomplished.
The examples assume that ISP1302 is being used as the external OTG transceiver.
Remove D+ pull-up
/* Remove D+ pull-up through ISP1302 */
OTG_I2C_TX = 0x15A; // Send ISP1302 address, R/W=0
OTG_I2C_TX = 0x007; // Send OTG Control (Clear) register address
OTG_I2C_TX = 0x201; // Clear DP_PULLUP bit, send STOP condition
Fig 41. State transitions implemented in software during B-device switching from peripheral to host
REMOVE_PU set?
HNP_FAILURE set?
HNP_SUCCESS set?
b_peripheral
when host sends SET_FEATURE
with b_hnp_enable,
set B_HNP_TRACK
remove D+ pull-up,
set PU_REMOVED
b_peripheral
add D+ pull-up
b_wait_acon
b_host
no
yes
go to
go to
go to
yes
no
no
yes