![GigaDevice Semiconductor GD32170C-START User Manual Download Page 9](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32170c-start/gd32170c-start_user-manual_2225792009.webp)
User Guide
GD32170C-START
8 /11
Learn to use GPIO for controlling the LED
Learn to use SysTick to generate 1ms delay
GD32170C-START-V1.0 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
GD32170C-START-V1.0 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 LED1 and LED2. When press
down the User Key, it will check the input value of the IO port. If the value is 0, wait for 50ms.
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 toggle the state of LED1 and 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 and LED2 will be turned
on. Press down the User Key again, LED1 and LED2 will be turned off.
5.3.
EXTI_Key_Interrupt_mode
5.3.1.
DEMO purpose
This Demo includes the following functions of GD32 MCU:
Learn to use GPIO to control the LED and the KEY
Learn to use EXTI to generate external interrupt
GD32170C-START-V1.0 board has two keys and two LEDs. The two keys are Reset key and
User key. The LED1 and LED2 are controlled by GPIO.