
User Guide
GD32130C-START
8 /11
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 for controlling the LED
Learn to use SysTick to generate 1ms delay
GD32130C-START-V1.1 board has two LEDs. The LED1 and LED2 are controlled by GPIO.
This demo will show how to light the LED.
5.1.2.
DEMO running Result
Download the program <01_GPIO_Running_LED> to the board, the states of LED1 and
LED2 are toggled every 200ms.
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
GD32130C-START-V1.1 board has two keys and two LEDs. The two keys are Reset key and
User key. The LED1 and LED2 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 0, wait for 100ms. Then
check the input value of the IO port again. If the value is still 0, indicates that the button is
pressed down successfully, and light the LED2.
5.2.2.
DEMO running Result
Download the program <02_GPIO_Key_Polling_mode> to the board, first of all, all the LEDs
will be flashed once for test. Then press down the User Key, LED1 will be turned on. Press
down the User Key again, LED1 will be turned off.