GD32F10x User Manual
762
The USB protocol insists on power management by the USB device. This becomes even
more important if the device draws power from the bus (bus-powered device). The following
constraints should be met by the bus-powered device.
A device in the non-configured state should draw a maximum of 100mA from the USB
bus.
A configured device can draw only up to what is specified in the Max Power field of the
configuration descriptor. The maximum value is 500mA.
A suspended device should draw a maximum of 500uA.
A device will go into the suspend state if there is no activity on the USB bus for more than
3ms. A suspended device wakes up, if RESUME signaling is detected.
USBD also supports software initiated remote wakeup. To initiate remote wakeup, the
application software must enable all clocks and clear the suspend bit after MCU is waked up.
This will cause the hardware to generate a remote wakeup signal upstream.
Setting the SETSPS bit to 1 enables the suspend mode, and it will disable the check of SOF
reception. Setting the LOWM bit to 1 will shut down the static power consumption in the analog
USB transceivers, but the RESUME signal is still able to be detected.
USB Interrupts
USBD has three interrupts: low-priority interrupt, high-priority interrupt and wakeup interrupt.
Software can configure these interrupts to route the interrupt condition to these entries in the
NVIC table. An interrupt will be generated when both the interrupt status bit and the
corresponding interrupt enable bit are set. The interrupt status bit is set by hardware if the
interrupt condition occurs (irrespective of the interrupt enable bit).
Low-priority interrupt (Channel 20): triggered by all USB events.
High-priority interrupt (Channel 19): triggered only by a correct transfer event for
isochronous and double-buffer bulk transfer.
Wakeup interrupt (Channel 42): triggered by the wakeup events.
23.6.4.
Operation guide
This section describes the operation guide for USBD.
USBD register initialization sequence
1. Clear the CLOSE bit in USBD_CTL register, then clear the SETRST bit.
2. Clear USBD_INTF register to remove any spurious pending interrupt.
3. Program USBD_BADDR register to set endpoint buffer base address.
4. Set USBD_CTL register to enable interrupts.
Содержание 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 ...