User Guide
GD32E507V-START
11/16
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
GD32E507V-START-V1.0 board has 2 keys and 1 LED. The keys are User Key and Reset
Key. The LED is controlled by GPIO.
This demo will show how to use the 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.3.2.
DEMO running result
Download the program < 03_EXTI_Key_Interrupt_mode > to the START board, LED1 is
turned on and off for test. When press down the User Key, LED1 will be turned on. Press
down the User Key again, LED1 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 USART. Firstly, the LED1 flash 2 times for test. Then, the USART 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 flash. Otherwise, LED1 turn
on.
The output information via the HyperTerminal is as following: