GD32F20x User Manual
881
change on data lines for 3ms. When USB device is in suspend state, most of its clocks are
closed to save power. The USB host is able to wake up the suspended device by generating
a resume signal on USB bus. When USBFS detects the resume signal, the WKUPIF flag in
USBFS_GINTF register will be set and the USBFS wakeup interrupt will be triggered.
In suspend mode, USBFS is also able to remotely wake up the USB bus. Software may set
RWKUP bit in USBFS_DCTL register to send a remote wakeup signal, and if remote wakeup
is supported in USB host, the host will begin to send the resume signal on USB bus.
Soft Disconnection
USBFS supports soft disconnection. After the device is powered on, USBFS will switch on
the pull-up resistor on DP line so that the host can detect the connection. It is able to force a
disconnection by setting the SD bit in USBFS_DCTL register. After the SD bit is set, USBFS
will directly switch off the pull-up resistor, so that USB host will detect a disconnection on USB
bus.
SOF tracking
When USBFS receives a SOF packet on USB bus, it will trigger a SOF interrupt and begin to
count the bus time by local USB clock. The frame number of the current frame is reported in
FNRSOF field in USBFS_DSTAT register. When the USB bus time reaches EOF1 or EOF2
point (End of Frame, described in USB 2.0 protocol), USBFS will trigger an EOPFIF interrupt
in USBFS_GINTF register. These flags and registers can be used to get current bus time and
position information.
28.5.4.
OTG function overview
USBFS supports OTG function described in OTG protocol 1.3, OTG function includes SRP
and HNP protocols.
A-Device and B-Device
A-Device is an OTG capable USB device with a Standard-A or Micro-A plug inserted into its
receptacle. The A-Device supplies power to VBUS and it is a host by default at the start of a
session. B-Device is an OTG capable USB device with a Standard-B, Micro-B or Mini-B plug
inserted into its receptacle, or a captive cable ending being a Standard-A plug. The B-Device
is a peripheral by default at the start of a session. USBFS uses the voltage level of ID pin to
identify A-Device or B-Device. The ID status is reported in IDPS bit in USBFS_GOTGCS
register. For the details of transfer states between A-Device and B-Device, please refer to
OTG 1.3 protocol.
HNP
The Host Negotiation Protocol (HNP) allows the host function to be switched between two
directly connected On-The-Go devices and eliminates the necessity of switching the cable
connections for the change about control of communications between the devices. HNP will
be initialized typically by the user or an application on the On-The-Go B-Device. HNP may
only be implemented through the Micro-AB receptacle on a device.
Содержание GD32F20 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F20x ARM Cortex M3 32 bit MCU User Manual Revision 2 2 Oct 2019 ...
Страница 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Страница 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Страница 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Страница 385: ...GD32F20x User Manual 385 ...
Страница 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...