GD32F20x User Manual
878
Figure 28-3. Connection with OTG mode
VBUS
DM
DP
ID
DP
ID
DM
VBus
5V Power
Supply
VDD
U
S
B
M
ic
ro
/M
in
i c
o
n
n
ec
to
r
GPIO
USBFS
GND
28.5.2.
USB host function
USB Host Port State
Host application may control state of the USB port via USBFS_HPCS register. After system
initialization, the USB port stays at power-off state. After PP bit is set by software, the internal
USB PHY is powered on, and the USB port changes into disconnected state. After a
connection is detected, USB port changes into connected state. The USB port changes into
enabled state after a port reset is performed on USB bus.
Figure 28-4. State transition diagram of host port
Power-off
Dis-connected
Connected
Enabled
set PP bit
clear PP bit or VBUS is
not valid in OTG host mode
connection event
disconnection event
port reset
Clear PP bit
disconnection event
clear PE bit
clear PP bit
Connection, Reset and Speed identification
As a USB host, USBFS will trigger a connection flag for application after a connection is
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...