User Manual
GD32450I-EVAL
44
/
51
HyperTerminal to print the automatic allocated ip address, then connect your mobile
phone to the wifi which the router send. Users can visit the eval board and control it on
your mobile phone.
5.28
USB_Device
5.28.1
HID_Keyboard
DEMO Purpose
This demo includes the following functions of GD32 MCU:
Learn how to use the USBFS peripheral mode
Learn how to implement USB HID(human interface) device
GD32450I-EVAL board has four keys and one USB_FS interface. The four keys are
Reset key, Wakeup key, User key and Tamper key. In this demo, the GD32450I-EVAL
board is enumerated as an USB Keyboard, which uses the native PC Host HID driver,
as shown below. The USB Keyboard uses three keys(wakeup key, tamper key and user
key) to output three characters (‘b’, ‘a’ and ‘c’). In addition, the demo also supports
remote wakeup which is the ability of a USB device to bring a suspended bus back to
the active condition, and the wakeup key is used as the remote wakeup source.
DEMO Running Result
According to the VBUSIG bit in USBFS_GCCFG register, user can decide whether or
not to jump JP5 to USB_FS. Then connect the EVAL board to the PC through USB cable
to
the
USB_FS
connector.
After
doing
this,
download
the
program
<28_USB_Device\HID_Keyboard> to the EVAL board and run. If you press the Wakeup
key, will output ‘b’. If you press the User key, will output ‘c’. If you press the Tamper key,
will output ‘a’.
If you want to test USB remote wakeup function, you can do as follows:
- Manually switch PC to standby mode
- Wait for PC to fully enter the standby mode