EasyManua.ls Logo

GigaDevice Semiconductor GD32E507Z-EVAL - Exti_Key_Interrupt_Mode; DEMO Purpose; DEMO Running Result; Usart_Printf

Default Icon
44 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
User Guide
GD32E507Z-EVAL
17/43
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
GD32E507Z-EVAL-V1.0 board has five user keys and four LEDs. The keys are KEY_A,
KEY_B, KEY_C, KEY_D, and KEY_Cet. The LEDs are controlled by GPIO.
This demo will show how to use the EXTI interrupt line to control the LED2. When press down
the KEY_B, it will produce an interrupt. In the interrupt service function, the demo will toggle
LED2.
5.3.2. DEMO running result
Download the program < 03_EXTI_Key_Interrupt_mode > to the EVAL board, LED2 is turned
on and off for test. When press down the KEY_B, LED2 will be turned on. Press down the
KEY_B again, LED2 will be turned off.
5.4. USART_Printf
5.4.1. DEMO purpose
This demo includes the following functions of GD32 MCU:
Learn to use GPIO control the LED
Learn to retarget the C library printf function to the USART
5.4.2. DEMO running result
Download the program < 04_USART_Printf > to the EVAL board, connect serial cable to
USART0 and jump JP13 to USART. Firstly, all the LEDs are turned on and off for test. Then,
this implementation outputs “USART printf example: please press the KEY_B” on the
HyperTerminal using USART0. Press the KEY_B, the LED1 will be turned on and serial port
will output “USART printf example”.
The output information via the HyperTerminal is as following

Table of Contents

Related product manuals