RM0402 Rev 6 973/1163
RM0402 USB on-the-go full-speed (OTG_FS)
1122
29.4.5 OTG detections
Additionally the OTG_FS uses the following functions:
• integrated ID pull-up resistor used to sample the ID line for A/B device identification.
• V
BUS
sensing comparators with hysteresis used to detect V
BUS
valid, A-B session valid
and session-end voltage thresholds. They are used to drive the session request
protocol (SRP), detect valid startup and end-of-session conditions, and constantly
monitor the V
BUS
supply during USB operations.
29.5 OTG_FS dual role device (DRD)
Figure 335. OTG_FS A-B device connection
1. External voltage regulator only needed when building a VBUS powered device.
2. STMPS2141STR needed only if the application has to support a VBUS powered device. A basic power
switch can be used if 5 V are available on the application board.
29.5.1 ID line detection
The host or peripheral (the default) role is assumed depending on the ID input pin. The ID
line status is determined on plugging in the USB cable, depending on whether a MicroA or
MicroB plug is connected to the micro-AB receptacle.
• If the B-side of the USB cable is connected with a floating ID wire, the integrated pull-
up resistor detects a high ID level and the default peripheral role is confirmed. In this
configuration the OTG_FS complies with the standard FSM described in section 4.2.4:
ID pin of the On-the-Go specification Rev2.0, supplement to the USB2.0.
• If the A-side of the USB cable is connected with a grounded ID, the OTG_FS issues an
ID line status change interrupt (CIDSCHG bit in OTG_GINTSTS) for host software
initialization, and automatically switches to the host role. In this configuration the
OTG_FS complies with the standard FSM described by section 4.2.4: ID pin of the On-
the-Go specification Rev2.0, supplement to the USB2.0.
MSv36917V2
STM32
OSC_IN
OSC_OUT
GPIO
GPIO + IRQ
V
DD
EN
Overcurrent
5 V to V
DD
Voltage
regulator
(1)
V
DD
5 V Pwr
VBUS
DM
DP
ID
V
SS
STMPS2141STR
Current-limited
power distribution
switch
(2)
USBmicro-AB connector
VBUS
DM
DP
ID