
RM0008
USB on-the-go full-speed (OTG_FS)
Doc ID 13902 Rev 12
935/1096
A-device host negotiation protocol
HNP switches the USB host role from the A-device to the B-device. The application must set
the HNP-capable bit in the Core USB configuration register to enable the OTG_FS controller
to perform HNP as an A-device.
Figure 323. A-device HNP
1.
DPPULLDOWN = signal from core to PHY to enable/disable the pull-down on the DP line inside the PHY.
DMPULLDOWN = signal from core to PHY to enable/disable the pull-down on the DM line inside the PHY.
1.
The OTG_FS controller sends the B-device a SetFeature b_hnp_enable descriptor to
enable HNP support. The B-device’s ACK response indicates that the B-device
supports HNP. The application must set host Set HNP Enable bit in the OTG Control
and status register to indicate to the OTG_FS controller that the B-device supports
HNP.
2.
When it has finished using the bus, the application suspends by writing the Port
suspend bit in the host port control and status register.
3.
When the B-device observes a USB suspend, it disconnects, indicating the initial
condition for HNP. The B-device initiates HNP only when it must switch to the host role;
otherwise, the bus continues to be suspended.
The OTG_FS controller sets the host negotiation detected interrupt in the OTG
interrupt status register, indicating the start of HNP.
The OTG_FS controller deasserts the DM pull down and DM pull down in the PHY to
indicate a device role. The PHY enables the OTG_FS_DP pull-up resistor to indicate a
connect for B-device.
The application must read the current mode bit in the OTG Control and status register
to determine device mode operation.
4.
The B-device detects the connection, issues a USB reset, and enumerates the
OTG_FS controller for data traffic.
5.
The B-device continues the host role, initiating traffic, and suspends the bus when
done.
The OTG_FS controller sets the early suspend bit in the Core interrupt register after 3
ms of bus idleness. Following this, the OTG_FS controller sets the USB Suspend bit in
the Core interrupt register.
a
i156
83
OTG core
DP
DM
DPPULLDOWN
DMPULLDOWN
Ho
s
t
Device
Ho
s
t
1
Sus
pend 2
3
4
5
Re
s
et
6
Tr
a
ffic
7
8
Connect
Tr
a
ffic