GD32F403xx User Manual
637
Figure 23-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), t he 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 configured by VBUSIG bit in USBFS_GCCFG register. So if the device is
not necessary to detect the voltage on VBUS pin, it could be configured by setting the VBUSIG
bit, then the VBUS pin can be f reed for other uses. Otherwise, the VBUS connection cannot
be omitted, and USBFS continuously monitor the VBUS voltage. It will immediately switch off
the pull-up resistor on DP line once that the VBUS voltage falls below the needed valid value,
then lead to be disconnection.
The OTG mode connection is described in the
Figure 23-3. Connection with OTG mode
When USBFS works in OTG mode, the FHM, FDM bits in USBFS_GUSBCS and VBUSIG bit
in USBFS_GCCFG 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.
Содержание GD32F403 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F403xx Arm Cortex M4 32 bit MCU User Manual Revision 2 6 Jul 2022 ...
Страница 177: ...GD32F403xx UserManual 177 Peripheral Channel 0 Channel 1 Channel 2 Channel 3 Channel 4 SDIO SDIO ...
Страница 217: ...GD32F403xx UserManual 217 ensures that no conversion is in progress ...