GD32F10x User Manual
775
Connection with host or device mode.
Figure 24-2. Connection with host or device mode
VBUS
DM
DP
DP
DM
VBUS
5V Power
Supply
(needed in
host mode)
VDD
U
S
B
A
/B
co
n
n
e
ct
o
r
GPIO
USBFS
GND
When USBFS works in host mode (FHM bit is set and FDM bit is cleared), the VBUS is 5V
power, and detecting pin which is using for voltage detection is defined in USB protocol. The
internal PHY cannot supply 5V VBUS power and only has some voltage comparers, charge
and dis-charge circuits on VBUS line. Thus, if application needs VBUS power, an external
power supply IC is needed. The VBUS connection between USBFS and the USB connector
can be omitted in host mode, so USBFS
doesn’t detect the voltage level on VBUS pin and
always assumes that the 5V power is present.
When USBFS works in device mode (FHM bit is cleared and FDM bit is set), the VBUS
detection circuit is connected to a GPIO pin. USBFS continuously monitor the VBUS voltage
by the GPIO pin and will immediately switch on the pull-up resistor on DP line once that the
VBUS voltage rise above the needed valid value. This will cause a connection. If the VBUS
voltage falls below the needed valid value, the pull-up resistor on DP line will be switched off
and a disconnection will happen.
The OTG mode connection is described in the
Figure 24-3. Connection with OTG mode
When USBFS works in OTG mode, the FHM, FDM bits in USBFS_GUSBCS should be
cleared. In this mode, the USBFS needs all the four pins: DM, DP, VBUS and ID, and needs
to use several voltage comparers to monitor the voltage on these pins. USBFS also contains
VBUS charge and discharge circuits to perform SRP request which is described in OTG
protocol. The OTG A-device or B-device is decided by the level of ID pins. USBFS controls
the pull-up or pull-down resistor during performing the HNP protocol.
Summary of Contents for GD32F10 Series
Page 63: ...GD32F10x User Manual 63 programmed during the chip production ...
Page 117: ...GD32F10x User Manual 117 010 1 0 011 0 9 ...
Page 416: ...GD32F10x User Manual 416 shadow register updates every update event ...
Page 427: ...GD32F10x User Manual 427 value ...
Page 518: ...GD32F10x User Manual 518 These bits are not used in SPI mode ...