GigaDevice Semiconductor GD32E507R-START User manual

GigaDevice Semiconductor Inc.
GD32E507R-START
User Guide
V1.0

User Guide
GD32E507R-START
1/17
Tables of Contents
TABLES OF CONTENTS ................................................................................................1
LIST OF FIGURES ..........................................................................................................3
LIST OF TABLES ............................................................................................................4
1. SUMMARY ................................................................................................................5
2. FUNCTION PIN ASSIGN...........................................................................................5
3. GETTING STARTED .................................................................................................5
4. HARDWARE LAYOUT OVERVIEW..........................................................................6
4.1. Power supply............................................................................................................... 6
4.2. Boot option .................................................................................................................. 6
4.3. LED............................................................................................................................... 6
4.4. KEY............................................................................................................................... 7
4.5. USART.......................................................................................................................... 7
4.6. USB............................................................................................................................... 7
4.7. Extension..................................................................................................................... 8
4.8. GD-Link ........................................................................................................................ 8
4.9. Arduino......................................................................................................................... 9
4.10. MCU......................................................................................................................... 10
5. ROUTINE USE GUIDE............................................................................................ 11
5.1. GPIO_Running_LED.................................................................................................. 11
5.1.1. DEMO purpose......................................................................................................................11
5.1.2. DEMO running result .............................................................................................................11
5.2. GPIO_Key_Polling_mode.......................................................................................... 11
5.2.1. DEMO purpose......................................................................................................................11
5.2.2. DEMO running result .............................................................................................................11
5.3. EXTI_Key_Interrupt_mode........................................................................................ 12
5.3.1. DEMO purpose..................................................................................................................... 12
5.3.2. DEMO running result ............................................................................................................ 12
5.4. USART_HyperTerminal_Interrupt............................................................................. 12
5.4.1. DEMO purpose..................................................................................................................... 12
5.4.2. DEMO running result ............................................................................................................ 12
5.5. TIMER_Key_EXTI....................................................................................................... 13
5.5.1. DEMO purpose..................................................................................................................... 13
5.5.2. DEMO running result ............................................................................................................ 13
5.6. USB MSC Device ....................................................................................................... 13
5.6.1. DEMO purpose..................................................................................................................... 13
5.6.2. DEMO Running Result ......................................................................................................... 14
5.7. USB HID Host............................................................................................................. 14

User Guide
GD32E507R-START
2/17
5.7.1. DEMO Purpose..................................................................................................................... 14
5.7.2. DEMO Running Result ......................................................................................................... 15
6. REVISION HISTORY...............................................................................................16

User Guide
GD32E507R-START
3/17
List of Figures
Figure 4-1. Schematic diagram of power supply...................................................................................... 6
Figure 4-2. Schematic diagram of boot option......................................................................................... 6
Figure 4-3. Schematic diagram of LED function ...................................................................................... 6
Figure 4-4. Schematic diagram of Key function....................................................................................... 7
Figure 4-5. Schematic diagram of USART ................................................................................................ 7
Figure 4-6. Schematic diagram of USB ..................................................................................................... 7
Figure 4-7. Schematic diagram of Extension............................................................................................ 8
Figure 4-8. Schematic diagram of GD-Link............................................................................................... 8
Figure 4-9. Schematic diagram of Arduino............................................................................................... 9
Figure 4-10. Schematic diagram of MCU................................................................................................. 10

User Guide
GD32E507R-START
4/17
List of Tables
Table 2-1. Function pin assignment........................................................................................................... 5
Table 6-1. Revision history ....................................................................................................................... 16

User Guide
GD32E507R-START
5/17
1. Summary
GD32E507R-START uses GD32E507RET6 as the main controller. It uses GD-Link Mini USB
interface to supply 5V power. Reset, Boot, K2-User Key, LED, USB and USART to USB
interface are also included. For more details please refer to GD32E507R-START-Rev1.1
schematic.
2. Function Pin Assign
Table 2-1. Function pin assignment
Function
Pin
Description
LED
PA7
LED1
PA8
LED2
PA10
LED3
PC13
LED4
RESET
K1-Reset
KEY
PA0
User Key
USART
PC12
UART4_TX
PD2
UART4_RX
USB
PA9
USB_VBUS
PA11
USB_DM
PA12
USB_DP
PC9
USB Pull-up Control
3. Getting started
The START board uses GD-Link Mini USB connecter to get power DC +5V, which is the
hardware system normal work voltage. AGD-Link on board is necessary in order to download
and debug programs. Select the correct boot mode and then power on, the LEDPWR will turn
on, which indicates the power supply is OK.
There are Keil version and IAR version of all projects. Keil version of the projects are created
based on Keil MDK-ARM 5.26 uVision5. IAR version of the projects are created based on IAR
Embedded Workbench for ARM 8.32.1. During use, the following points should be noted:
1. If you use Keil uVision5 to open the project. In order to solve the "Device Missing (s)"
problem, you can install GigaDevice.GD32E50x_DFP.1.3.0.pack.
2. If you use IAR to open the project, install IAR_GD32F50x_ADDON_1.3.0.exe to load the
associated files.

User Guide
GD32E507R-START
6/17
4. Hardware layout overview
4.1. Power supply
Figure 4-1. Schematic diagram of power supply
G
1
Vout 2
Vin
34
U2 AMS1117-3.3
E1
16V/10uF,AVX
E2
16V/10uF,AVX
C17
50V/0.1uF
C18
50V/0.1uF
+3V3
LEDPWR
LED0603
R7
470Ω
+U5V P1
SMD1210P005TF
+5V0
4.2. Boot option
Figure 4-2. Schematic diagram of boot option
R4
10KΩ
1
2
3
JP2
BOOT0
GND
R5
10KΩ
1
2
3
JP3
BOOT1
GND
BOOT0
PB2
+3V3
+3V3
4.3. LED
Figure 4-3. Schematic diagram of LED function
PA10
PA8
PA7LED1
LED0603
LED2
LED0603
LED3
LED0603
LED
GND
R1
470Ω
R2
470Ω
R8
470Ω
PC13 LED4
LED0603
R10
470Ω

User Guide
GD32E507R-START
7/17
4.4. KEY
Figure 4-4. Schematic diagram of Key function
PA0
R11
10KΩ
+3V3
GND
C14
50V/0.01uF
KEY
K2
K-1102B
4.5. USART
Figure 4-5. Schematic diagram of USART
UD+
1
UD-
2
GND
3
RTS#
4
CTS#
5TNOW 6
VCC 7
TXD 8
RXD 9
V3 10
U3
CH340E
D+
D-
+3V3
+3V3
UART4_TX
UART4_RX
C11
50V/0.01uF
C12
50V/0.1uF
D+
D-
C13
50V/4700pF
R9
1MΩ
USART To USB
PC12
PD2
VCC 1
D- 2
D+ 3
ID 4
GND 5
SHELL 6
CN3
Mini_USB
4.6. USB
Figure 4-6. Schematic diagram of USB

User Guide
GD32E507R-START
8/17
GND
R54
47KΩ
R55
470R
R58 22R
R59 22R
PC9
E10
16V/10uF,AVX C48
50V/0.1uF
GND
PA11
PA12
1
2
3
Q1
S8550
R62
1MΩ
C49
50V/4700pF
+5V0
USB_VBUS
USB_DM
USB_DP
VBUS
1
DM
2
DP
3
ID
4
GND
5
Shield
6
USB_MiniAB receptacle
CN2
Mini_USB
PA9
4.7. Extension
Figure 4-7. Schematic diagram of Extension
Extension Pin
1
2
3
4
5
6
JP1
HEADER 6
PC0
PC1
PC2
PC3
PC4
PC5
4.8. GD-Link
Figure 4-8. Schematic diagram of GD-Link

User Guide
GD32E507R-START
9/17
L_USB_Ctr
C100
50V/20pF
C102
50V/20pF
Y101
49SMD-8MHz
GND L_NRST
+3V3
GND
R102
10KΩ
C103
50V/0.1uF R104
10KΩ
GND
C105
50V/0.1uF
C106
50V/0.1uF
C107
50V/0.1uF
C108
50V/0.1uF
R101
1MΩL_OSC_IN
L_OSC_OUT
L_OSC_IN
L_OSC_OUT
L_NRST
GND
+3V3
GND
1
2
3
4
JP100
4×1P2.54
+3V3
GND
Reset
L_TMS/IO
L_TDI
L_TDO/SWO
L_TCK/CLK
L_USB_DP
L_SWDIO
L_SWDCK
L_SWDIO
L_SWDCK
+3V3
L_USB_DM
BOOT0
44
NRST
7
OSC_IN/PD0
5
OSC_OUT/PD1
6
PA0-WKUP
10
PA1
11
PA2
12
PA3
13
PA4
14
PA5
15
PA6
16
PA7
17
PA8
29
PA9
30
PA10
31
PA11
32
PA12
33
PA13/JTMS/SWDIO
34
PA14/JTCK/SWCLK
37
PA15/JTDI
38
PB018
PB119
PB2/BOOT1 20
PB3/JTDO 39
PB4/JNTRST 40
PB541
PB642
PB743
PB845
PB946
PB10 21
PB11 22
PB12 25
PB13 26
PB14 27
PB15 28
PC13-TAMPER-RTC 2
PC14-OSC32_IN 3
PC15-OSC32_OUT 4
VBAT
1
VDD_1
24
VDD_2
36
VDD_3
48
VDDA
9
VSS_1 23
VSS_2 35
VSS_3 47
VSSA 8
U0
GD32F103C8T6
L_TReset
L_LED1
L_LED2
L_LED1
LED0603
L_LED2
LED0603
R109 470Ω
R110 470Ω
GND
GND
R105 22R
R106 22R
R108
1MΩC104
50V/4700pF
L_USB_DM
L_USB_DP
GND
R107 1.5KΩL_USB_Ctr
VCC 1
D- 2
D+ 3
ID 4
GND 5
SHELL 6
CN100
Mini_USB
+U5V
4.9. Arduino
Figure 4-9. Schematic diagram of Arduino
Ardunio
1
2
3
4
5
6
JP7
HEADER 6
1
2
3
4
5
6
7
8
JP6
HEADER 8
1
2
3
4
5
6
7
8
JP9
HEADER 8
1
2
3
4
5
6
7
8
9
10
JP8
HEADER 10
+3V3
+3V3
NRST
A6
A1
A2
A3
A4
A5 D0-Rx
D1-Tx
D2
D4
D3~
D5~
D6~
D7
D8
D9~
D10~
D13
D12
D11~
D14-SDA1
D15-SCL1
PC10
PC11
PB10
PB11
PA1
PA2
PA3
PA4
PA5
PA6
PB13
PB14
PB15
PB12
PB0
PB1
PB8
PB4
PB5
PB6
PB7
PB9
+5V0
+5V0

User Guide
GD32E507R-START
10/17
4.10. MCU
Figure 4-10. Schematic diagram of MCU
PA4
PA5
PA6
PA7
PA0
PA1
PA3
PA2
PA11
PA12
PA9
PA10
PA15
PA13
PA14
PA8
PB5
PB6
PB7
PB1
PB2
PB3
PB0
PB4
PB12
PB13
PB14
PB15
PB10
PB11
PB8
PB9
PC4
PC5
PC6
PC7
PC0
PC1
PC3
PC2
PC12
PC13
PC14
PC15
PC8
PC9
PC11
PC10
C1
50V/20pF
C2
50V/20pF
Y1
49SMD-25MHz
GND
NRST
K1
K-1102B
+3V3
GND
R6
10KΩ
C16
50V/0.1uF
GND
C3
50V/10pF
C4
50V/10pF
Y2
32.768KHz
C5
50V/0.1uF
C6
50V/0.1uF
C7
50V/0.1uF
C8
50V/0.1uF
C9
50V/0.1uF
R3
1MΩ
OSC32_IN
OSC32_OUT
PC14
PC15
OSC_IN
OSC_OUT
GND
+3V3
C10
50V/0.1uF
+3V3
GND
BOOT0
OSC_IN
OSC_OUT
NRST
PD2
PA15
PA13
PA14
PB3
JTDI
JTMS/SWDIO
JTCK/SWDCLK
JTDO
L_TMS/IO
L_TCK/CLK
L_TDO/SWO
L_TDI
L_TReset
GDLink JTAG
NRST
BOOT0
60
NRST
7
OSC_IN/PD0
5
OSC_OUT/PD1
6
PA0-WKUP
14
PA1
15
PA2
16
PA3
17
PA4
20
PA5
21
PA6
22
PA7
23
PA8
41
PA9
42
PA10
43
PA11
44
PA12
45
PA13/JTMS
46
PA14/JTCK
49
PA15/JTDI
50
PB026
PB127
PB2/BOOT1 28
PB3/JTDO 55
PB4/JNTRST 56
PB557
PB658
PB759
PB861
PB962
PB10 29
PB11 30
PB12 33
PB13 34
PB14 35
PB15 36
PC08
PC19
PC210
PC311
PC424
PC525
PC637
PC738
PC839
PC940
PC10 51
PC11 52
PC12 53
PC13-TAMPER-RTC 2
PC14-OSC32_IN 3
PC15-OSC32_OUT 4
PD2
54
VBAT
1
VDD_1
32
VDD_2
48
VDD_3
64
VDD_4
19
VDDA
13
VSS_1 31
VSS_2 47
VSS_3 63
VSS_4 18
VSSA 12
U1
GD32E507RET6
1
2
3
4
JP4
4×1P2.54
+3V3
GND
SWD

User Guide
GD32E507R-START
11/17
5. Routine use guide
5.1. GPIO_Running_LED
5.1.1. DEMO purpose
This demo includes the following functions of GD32 MCU:
Learn to use GPIO control the LED
Learn to use SysTick to generate 1ms delay
GD32E507R-START-V1.1 board has 2 keys and four LEDs. The keys are User Key and Reset
Key. The LEDs are controlled by GPIO.
This demo will show how to light the LEDs.
5.1.2. DEMO running result
Download the program < 01_GPIO_Running_LED > to the START board, four LEDs can light
cycles.
5.2. GPIO_Key_Polling_mode
5.2.1. DEMO purpose
This demo includes the following functions of GD32 MCU:
Learn to use GPIO control the LED and the KEY
Learn to use SysTick to generate 1ms delay
GD32E507R-START-V1.1 board has 2 keys and four LEDs. The keys are User Key and Reset
Key. The LEDs are controlled by GPIO.
This demo will show how to use the User Key to control the LED2. When press down the User
Key, it will check the input value of the IO port. If the value is 1 and will wait for 100ms. Check
the input value of the IO port again. If the value still is 1, it indicates that the button is pressed
successfully and toggle LED2.
5.2.2. DEMO running result
Download the program < 02_GPIO_Key_Polling_mode > to the START board, press down
the User Key, LED2 will be turned on. Press down the User Key again, LED2 will be turned
off.

User Guide
GD32E507R-START
12/17
5.3. EXTI_Key_Interrupt_mode
5.3.1. DEMO purpose
This demo includes the following functions of GD32 MCU:
Learn to use GPIO control the LED and the KEY
Learn to use EXTI to generate external interrupt
GD32E507R-START-V1.1 board has 2 keys and four LEDs. The keys are User Key and Reset
Key. The LEDs are controlled by GPIO.
This demo will show how to use the EXTI interrupt line to control the LED2. When press down
the User Key, it will produce an interrupt. In the interrupt service function, the demo will toggle
LED2.
5.3.2. DEMO running result
Download the program < 03_EXTI_Key_Interrupt_mode > to the START board, LED2 is
turned on and off for test. When press down the User Key, LED2 will be turned on. Press
down the User Key again, LED2 will be turned off.
5.4. USART_HyperTerminal_Interrupt
5.4.1. DEMO purpose
This demo includes the following functions of GD32 MCU:
Learn to use the USART transmit and receive interrupts to communicate with the
HyperTerminal.
5.4.2. DEMO running result
Download the program <04_USART_HyperTerminal_Interrupt> to the START board, connect
serial cable to UART. Firstly, all the LEDs are turned on and off for test. Then, the UART4
sends the tx_buffer array (from 0x00 to 0xFF) to the hyperterminal and waits for receiving
data from the hyperterminal that you must send. The string that you have sent is stored in the
rx_buffer array. The receive buffer have a BUFFER_SIZE bytes as maximum. After that,
compare tx_buffer with rx_buffer. If tx_buffer is same with rx_buffer, LED1, LED2, LED3,
LED4 flash by turns. Otherwise, LED1, LED2, LED3, LED4 toggle together.
The output information via the HyperTerminal is as following:

User Guide
GD32E507R-START
13/17
5.5. TIMER_Key_EXTI
5.5.1. DEMO purpose
This demo includes the following functions of GD32 MCU:
Learn to use GPIO control the LED and the KEY
Learn to use EXTI to generate external interrupt
Learn to use TIMER to generate PWM
GD32E507R-START board has two keys and four LEDs. The two keys are Reset key and
User key. The LED1, LED2, LED3 and LED4 are controlled by GPIO.
This demo will show how to use the TIMER PWM to trigger EXTI interrupt to toggle the state
of LED2 and EXTI interrupt line to control the LED1. When press down the User Key, it will
produce an interrupt. In the interrupt service function, the demo will toggle LED1.
5.5.2. DEMO running result
Download the program < 05_TIMER_Key_EXTI > to the START board, all the LED1 and
LED2 are flashed once for test, press down the User Key, LED1 will be turned on. Press down
the User Key again, LED1 will be turned off. Connect PA6 (TIMER2_CH0) and PA4 with
DuPont line. The LED2 will be toggled every 500ms.
5.6. USB MSC Device
5.6.1. DEMO purpose
This demo includes the following functions of GD32 MCU:
Learn how to use the USBHS
Learn how to implement USB MSC(mass storage) device
This demo mainly implements a U disk. U disk is currently very widely used removable MSC
devices. MSC, the Mass Storage device Class, is a transport protocol between a computer

User Guide
GD32E507R-START
14/17
and mobile devices, which allow a universal serial bus (USB) equipment to access a host
computing device, file transfer between them, mainly including mobile hard disk, mobile U
disk drive, etc. The MSC device must have a storage medium, and this demo uses the MCU's
internal SRAM as the storage medium. For more details of the MSC protocol please refer to
the MSC protocol standard.
MSC device will use a variety of transport protocols and command formats for communication,
so it need to choose the appropriate protocol and command format in the realization of the
application. This demo selects the BOT (bulk only transport) protocol and the required SCSI
(small computer interface) command, and is compatible with a wide variety of Window
operating systems. Specific BOT protocol and SCSI command specification please refer to
the standard of their agreement.
5.6.2. DEMO Running Result
Download the program < 06_USB_MSC_Device > to the EVAL board and run. When the start
board is connected to the PC, you will find a USB large capacity storage device is in the
universal serial bus controller, and there is 1 more disk drives in the equipment manager of
PC.
Then, after opening the resource manager, you will see more of the 1 disk, as shown in the
following diagram:
At this point, the write/read/formatting operation can be performed as the other mobile
devices.
5.7. USB HID Host
5.7.1. DEMO Purpose
This demo includes the following functions of GD32 MCU:
Learn to use the USBHS as a HID host
Learn the operation between the HID host and the mouse device
Learn the operation between the HID host and the keyboard device
GD32E507R-START board integrates the USBHS module, and the module can be used as a
USB device, a USB host or an OTG device. This demo mainly shows how to use the USBHS
as a USB HID host to communicate with external USB HID device.

User Guide
GD32E507R-START
15/17
5.7.2. DEMO Running Result
Download the program < 07_USB_HID_Host > to the start board and run.
If a mouse has been attached, the user will see the information of mouse enumeration. First
pressing the USER key will see the inserted device is mouse, and then moving the mouse
will show the position of mouse in the HyperTerminal.
If a keyboard has been attached, the user will see the information of keyboard enumeration.
First pressing the USER key will see the inserted device is keyboard, and then pressing the
keyboard will show the state of the button in the HyperTerminal

User Guide
GD32E507R-START
16/17
6. Revision history
Table 6-1. Revision history
Revision No.
Description
Date
1.0
Initial Release
Aug.14, 2020

User Guide
GD32E507R-START
17/17
Important Notice
This document is the property of GigaDevice Semiconductor Inc. and its subsidiaries (the "Company"). This document, including any
product of the Company described in this document (the “Product”), is owned by the Company under the intellectual property laws and
treaties of the People’s Republic of China and other jurisdictions worldwide. The Company reserves all rights under such laws and
treaties and does not grant any license under its patents, copyrights, trademarks, or other intellectual property rights. The names and
brands of third party referred thereto (if any) are the property of their respective owner and referred to for identification purposes only.
The Company makes no warranty of any kind, express or implied, with regard to this document or any Product, including, but not
limited to, the implied warranties of merchantability and fitness for a particular purpose. The Company does not assume any liability
arising out of the application or use of any Product described in this document.Any information provided in this document is provided
only for reference purposes. It is the responsibility of the user of this document to properly design, program, and test the functionality
and safety of any application made of this information and any resulting product. Except for customized products which has been
expressly identified in the applicable agreement, the Products are designed, developed, and/or manufactured for ordinary business,
industrial, personal, and/orhousehold applications only. The Products are not designed, intended, or authorized for use ascomponents
in systems designed or intended for the operation of weapons, weapons systems, nuclear installations, atomic energy control
instruments, combustion control instruments, airplane or spaceship instruments, transportation instruments, traffic signal instruments,
life-support devices or systems, other medical devices or systems (including resuscitation equipment and surgical implants), pollution
control or hazardous substances management, or other uses where the failure of the device or Product could cause personal injury,
death, property or environmental damage ("Unintended Uses"). Customers shall take any and all actions to ensure using and selling
the Products in accordance with the applicable laws and regulations. The Company is not liable, in whole or in part, and customers
shall and hereby do release the Company as well as it’s suppliers and/or distributors from any claim, damage, or other liability arising
from or related to all Unintended Uses of the Products. Customers shall indemnify and hold the Company as well as it’s suppliers
and/or distributors harmless from and against all claims, costs, damages, and other liabilities, including claims for personal injury or
death, arising from or related to any Unintended Uses of the Products.
Information in this document is provided solely in connection with the Products. The Company reserves the right to make changes,
corrections, modifications or improvements to this document and Products and services described herein at any time, without notice.
© 2020 GigaDevice –All rights reserved
Table of contents
Other GigaDevice Semiconductor Semiconductor manuals