GD32F10x User Manual
778
USBFS supports all the four kinds of transfer types: control, bulk, interrupts and isochronous.
USB 2.0 protocol divides these transfers into 2 kinds: non-periodic transfer (control and bulk)
and periodic transfer (interrupt and isochronous). Based on this, USBFS includes two request
queues: periodic request queue and non-periodic request queue, to perform efficient
transaction schedule. A request entry in a request queue described above may represent a
USB transaction request or a channel operation request.
Application needs to write packet into data FIFO via AHB register interface if it wants to start
an OUT transaction on USB bus. USBFS hardware will automatically generate a transaction
request entry in request queue after the application wrote a whole packet.
The request entries in request queue are processed in order by transaction control module.
USBFS always tries to process periodic request queue firstly and secondly process non-
periodic request queue.
After a start of frame, USBFS begins to process periodic queue until the queue is empty or
bus time required by the current periodic request is not enough, and then process the non-
periodic queue. This strategy ensures the bandwidth of periodic transactions in a frame. Each
time the USBFS reads and pops a request entry from request queue. If this is a channel
disable request, it immediately disables the channel and prepares to process the next entry.
If the current request is a transaction request and the USB bus time is enough for this
transaction, USBFS will employ SIE to generate this transaction on USB bus.
When the required bus time for the current request is not enough in the current frame, and if
this is a periodic request, USBFS stops processing the periodic queue and starts to process
non-periodic request. If this is a non-periodic queue the USBFS will stop processing any
queue and wait until the end of current frame.
24.5.3.
USB device function
USB Device Connection
In device mode, USBFS stays at power-off state after initialization. After connecting to a USB
host with 5V power supply through VBUS pin, USBFS enters into powered state. USBFS
begins to switch on the pull-up resistor on DP line, thus, host side will detect a connection
event.
Note
: the VBUS pin must be connected to the PA9 for detecting the level.
Reset and Speed-Identification
The USB host always starts a USB reset when it detects a device connection, and USBFS in
device mode will trigger a reset interrupt by hardware when it detects the reset event on USB
bus.
After reset sequence, USBFS will trigger an ENUMF interrupt in USBFS_GINTF register and
reports current enumerated device speed in ES bits in USBFS_DSTAT register, this bit field
Содержание GD32F10 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F10x Arm Cortex M3 32 bit MCU User Manual Revision 2 6 Jun 2022 ...
Страница 63: ...GD32F10x User Manual 63 programmed during the chip production ...
Страница 117: ...GD32F10x User Manual 117 010 1 0 011 0 9 ...
Страница 416: ...GD32F10x User Manual 416 shadow register updates every update event ...
Страница 427: ...GD32F10x User Manual 427 value ...
Страница 518: ...GD32F10x User Manual 518 These bits are not used in SPI mode ...