
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
261 of 808
NXP Semiconductors
UM10360
Chapter 13: LPC17xx USB OTG controller
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.
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
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 39. 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