29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RM0008<br />

USB on-the-go full-speed (OTG_FS)<br />

A-device host negotiation protocol<br />

HNP switches the USB host role from the A-device to the B-device. The application must set<br />

the HNP-capable bit in the Core USB configuration register to enable the OTG_FS controller<br />

to perform HNP as an A-device.<br />

Figure 282. A-device HNP<br />

OTG core<br />

1<br />

Host Device Host<br />

DP<br />

Suspend 2<br />

3<br />

4 5<br />

Reset<br />

6<br />

Traffic 7<br />

8<br />

Connect<br />

DM<br />

Traffic<br />

DPPULLDOWN<br />

DMPULLDOWN<br />

ai15683<br />

1. DPPULLDOWN = signal from core to PHY to enable/disable the pull-down on the DP line inside the PHY.<br />

DMPULLDOWN = signal from core to PHY to enable/disable the pull-down on the DM line inside the PHY.<br />

1. The OTG_FS controller sends the B-device a SetFeature b_hnp_enable descriptor to<br />

enable HNP support. The B-device’s ACK response indicates that the B-device<br />

supports HNP. The application must set Host Set HNP Enable bit in the OTG Control<br />

<strong>and</strong> status register to indicate to the OTG_FS controller that the B-device supports<br />

HNP.<br />

2. When it has finished using the bus, the application suspends by writing the Port<br />

suspend bit in the Host port control <strong>and</strong> status register.<br />

3. When the B-device observes a USB suspend, it disconnects, indicating the initial<br />

condition for HNP. The B-device initiates HNP only when it must switch to the host role;<br />

otherwise, the bus continues to be suspended.<br />

The OTG_FS controller sets the Host negotiation detected interrupt in the OTG<br />

interrupt status register, indicating the start of HNP.<br />

The OTG_FS controller deasserts the DM pull down <strong>and</strong> DM pull down in the PHY to<br />

indicate a device role. The PHY enables the OTG_FS_DP pull-up resistor to indicate a<br />

connect for B-device.<br />

The application must read the current mode bit in the OTG Control <strong>and</strong> status register<br />

to determine Device mode operation.<br />

4. The B-device detects the connection, issues a USB reset, <strong>and</strong> enumerates the<br />

OTG_FS controller for data traffic.<br />

5. The B-device continues the host role, initiating traffic, <strong>and</strong> suspends the bus when<br />

done.<br />

The OTG_FS controller sets the early suspend bit in the Core interrupt register after 3<br />

ms of bus idleness. Following this, the OTG_FS controller sets the USB Suspend bit in<br />

the Core interrupt register.<br />

Doc ID 13902 Rev 9 833/995

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!