AN050
GD32 USBFS&USBHS Firmware Library User Guide
50
#ifdef USE_EMBEDDED_PHY
#define USB_EMBEDDED_PHY_ENABLED
#endif
// #define USB_HS_INTERNAL_DMA_ENABLED
#endif
#define USB_SOF_OUTPUT 0
#define USB_LOW_POWER 0
//#define USB_LOW_PWR_ENABLE
/****************** USB OTG MODE CONFIGURATION ********************************/
#define USE_HOST_MODE
//#define USE_DEVICE_MODE
//#define USE_OTG_MODE
Table 6-2
. usb_conf.h Configuration description
Configuration name
Functional description
USB_RX_FIFO_FS_SIZE
Received FIFO size
USB_HTX_NPFIFO_FS_SIZE
Non periodic transmit FIFO size
USB_HTX_PFIFO_FS_SIZE
periodic transmit FIFO size
USB_ULPI_PHY_ENABLED
Enable ULPI PHY
USB_EMBEDDED_PHY_ENABLED
Enable embedded PHY
USB_SOF_OUTPUT
Enable SOF output (PA8 pin)
USB_LOW_POWER
Enable low power mode
USB_LOW_PWR_ENABLE
Enable VBUS SENSING
USE_HOST_MODE
Host mode
USE_DEVICE_MODE
Device mode
USE_OTG_MODE
OTG mode
Note:
only merely one of three modes could be selected.
6.2.
Host VBUS Configuration
There is two type circuits for USB host in GD32 EVAL board.
1, control VBUS through building triode circuit (include F10X/F20X/F30X/E103/F450Z-EVAL)