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  288 of 841
NXP Semiconductors
UM10360
Chapter 13: LPC176x/5x USB OTG
The OTG software stack is responsible for implementing the HNP state machines as 
described in the On-The-Go Supplement to the USB 2.0 Specification.
The OTG controller hardware provides support for some of the state transitions in the 
HNP state machines as described in the following subsections.
The USB state machines, the HNP switching, and the communications between the USB 
controllers are described in more detail in the following documentation:
• USB OHCI specification
• USB OTG supplement, version 1.2
• USB 2.0 specification
• ISP1302 data sheet and user manual
 
13.9.1 B-device: peripheral to host switching
In this case, the default role of the OTG controller is peripheral (B-device), and it switches 
roles from Peripheral to Host.
The On-The-Go Supplement defines the behavior of a dual-role B-device during HNP 
using a state machine diagram. The OTG software stack is responsible for implementing 
all of the states in the Dual-Role B-Device State Diagram.
The OTG controller hardware provides support for the state transitions between the states 
b_peripheral, b_wait_acon, and b_host in the Dual-Role B-Device state diagram. Setting 
B_HNP_TRACK in the OTGStCtrl register enables hardware support for the B-device 
switching from peripheral to host. The hardware actions after setting this bit are shown in 
Figure 40
.
Fig 39. USB OTG controller with software stack
HOST
CONTROLLER
MUX
OHCI
STACK
OTG
STACK
DEVICE
STACK
USB BUS
ISP1302
OTG
CONTROLLER
DEVICE
CONTROLLER
I2C
CONTROLLER