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
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
232 of 571
NXP Semiconductors
UM10316
Chapter 15: LPC29xx USB OTG interface
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 ISP1301 is being used as the external OTG
transceiver.
Remove D+ pull-up
/* Remove D+ pull-up through ISP1301 */
OTG_I2C_TX = 0x15A; // Send ISP1301 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 55. 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