User Manual
GD32450I-EVAL
18
/
51
5.1.2
DEMO Running Result
Download the program <01_GPIO_Runing_Led> to the EVAL board, LED1, LED2,
LED3 will turn on in sequence with interval of 200ms, and turn off together, 200ms later,
repeat the process.
5.2
GPIO_Keyboard_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
GD32450I-EVAL board has four keys and three LEDs. The four keys are Reset key,
Tamper key, Wakeup key and User key. The LED1, LED2 and LED3 are controlled by
GPIO.
This demo will show how to use the Tamper key to control the LED1.When press down
the Tamper Key, it will check the input value of the IO port. If the value is 0 and will wait
for 100ms.Check the input value of the IO port again. If the value still is 0, it indicates
that the button is pressed successfully and toggle LED1.
5.2.2
DEMO Running Result
Download the program <02_GPIO_KeyBoard_Polling_mode> to the EVAL board, press
down the Tamper Key, LED1 will be turned on. Press down the Tamper Key again, LED1
will be turned off.
5.3
GPIO_KeyBoard_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
GD32450I-EVAL board has four keys and three LEDs. The four keys are Reset key,
Tamper key, Wakeup key and User key. The LED1, LED2 and LED3 are controlled by
GPIO.