User Guide
GD32E230K-START
7
/
10
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
GD32E230K-START board has two keys and one LED. The two keys are Reset key and
Wakeup key. The LED1 are controlled by GPIO.
This demo will show how to use the Wakeup key to control the LED1. When press down
the Wakeup Key, it will check the input value of the IO port. If the value is 1 and will wait
for 50ms. 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 LED1.
5.2.2
DEMO Running Result
Download the program < 02_GPIO_KeyBoard_Polling_mode > to the EVAL board, all the
LEDs are flashed once for test and LED1 is on, press down the Wakeup Key, LED1 will
be turned off. Press down the Wakeup Key again, LED1 will be turned on.
5.3
EXTI_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
GD32E230K-START board has two keys and one LED. The two keys are Reset key and
Wakeup key. The LED1 are controlled by GPIO.
This demo will show how to use the EXTI interrupt line to control the LED1.When press
down the Wakeup Key, it will produce an interrupt. In the interrupt service function, the
demo will toggle LED1.
5.3.2
DEMO Running Result
Download the program < 03_EXTI_KeyBoard_Interrupt_mode > to the EVAL board, all