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.

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

RM0008<br />

26.4 OTG dual role device (DRD)<br />

Figure 261. OTG A-B device connection<br />

V DD<br />

(3)<br />

5 V to V DD<br />

voltage regulator (1)<br />

V DD<br />

(2)<br />

GPIO+IRQ<br />

<strong>STM32F105xx</strong><br />

STM32F107xx<br />

PA9<br />

OSC_IN<br />

OSC_OUT<br />

GPIO<br />

PA11<br />

PA12<br />

PA10<br />

EN<br />

Overcurrent<br />

ST20x2<br />

Current-limited<br />

power distribution<br />

switch (2)<br />

5 V Pwr<br />

VBUS<br />

DM<br />

DP<br />

ID<br />

V SS<br />

USB micro-AB connector<br />

ai17115<br />

1. External voltage regulator only needed when building a V BUS powered device<br />

2. ST20x2 only needed if the application has to to support V BUS powered devices. A basic power switch can<br />

be used if 5 V are available on the application board.<br />

3. V DD range is between 2 V <strong>and</strong> 3.6 V.<br />

26.4.1 ID line detection<br />

The Host or Peripheral (the default) role is assumed depending on the ID input pin. The ID<br />

line status is determined on plugging in the USB, depending on which side of the USB cable<br />

is connected to the micro-AB receptacle.<br />

● If the B-side of the USB cable is connected with a floating ID wire, the integrated pull-up<br />

resistor detects a high ID level <strong>and</strong> the default Peripheral role is confirmed. In this<br />

configuration the OTG_FS complies with the st<strong>and</strong>ard FSM described by section 6.8.2:<br />

On-The-Go B-Device of the On-The-Go Specification Rev1.3 supplement to the<br />

USB2.0.<br />

● If the A-side of the USB cable is connected with a grounded ID, the OTG_FS issues an<br />

ID line status change interrupt (CIDSCHG bit in OTG_FS_GINTSTS) for host software<br />

initialization, <strong>and</strong> automatically switches to the Host role. In this configuration the<br />

OTG_FS complies with the st<strong>and</strong>ard FSM described by section 6.8.1: On-The-Go A-<br />

Device of the On-The-Go Specification Rev1.3 supplement to the USB2.0.<br />

26.4.2 HNP dual role device<br />

The HNP capable bit in the Global USB configuration register (HNPCAP bit in OTG_FS_<br />

GUSBCFG) enables the OTG_FS Core to dynamically change its role from A-Host to A-<br />

peripheral <strong>and</strong> vice-versa, or from B-Peripheral to B-Host <strong>and</strong> vice-versa according to the<br />

host negotiation protocol (HNP). The current device status can be read by the combined<br />

values of the Connector ID Status bit in the Global OTG control <strong>and</strong> status register (CIDSTS<br />

bit in OTG_FS_GOTGCTL) <strong>and</strong> the current mode of operation bit in the global interrupt <strong>and</strong><br />

status register (CMOD bit in OTG_FS_GINTSTS).<br />

698/995 Doc ID 13902 Rev 9

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

Saved successfully!

Ooh no, something went wrong!