advertisement
▼
Scroll to page 2
of
17
GigaDevice Semiconductor Inc. GD32EPRTV-START User Guide V1.0 User Guide GD32EPRTV-START Tables of Contents TABLES OF CONTENTS ................................................................................................ 1 LIST OF FIGURES .......................................................................................................... 3 LIST OF TABLES ............................................................................................................ 4 1. SUMMARY ................................................................................................................ 5 2. FUNCTION PIN ASSIGN ........................................................................................... 5 3. GETTING STARTED ................................................................................................. 5 4. HARDWARE LAYOUT OVERVIEW .......................................................................... 6 4.1. 4.2. 4.3. 4.4. 4.5. 4.6. 4.7. 4.8. 4.9. Power supply ............................................................................................................... 6 Boot option .................................................................................................................. 6 LED ............................................................................................................................... 6 KEY ............................................................................................................................... 6 USART .......................................................................................................................... 7 USB............................................................................................................................... 7 Extension ..................................................................................................................... 7 GD-Link ........................................................................................................................ 8 MCU .............................................................................................................................. 9 5. ROUTINE USE GUIDE ............................................................................................ 10 5.1. GPIO_Running_LED .................................................................................................. 10 5.1.1. DEMO purpose ..................................................................................................................... 10 5.1.2. DEMO running result ............................................................................................................ 10 5.2. GPIO_Key_Polling_mode .......................................................................................... 10 5.2.1. DEMO purpose ..................................................................................................................... 10 5.2.2. DEMO running result ............................................................................................................ 10 5.3. EXTI_Key_Interrupt_mode ........................................................................................ 11 5.3.1. DEMO purpose ...................................................................................................................... 11 5.3.2. DEMO running result ............................................................................................................. 11 5.4. USART_HyperTerminal_Interrupt ............................................................................. 11 5.4.1. DEMO purpose ...................................................................................................................... 11 5.4.2. DEMO running result ............................................................................................................. 11 5.5. TIMER_Key_EXTI ....................................................................................................... 12 5.5.1. DEMO purpose ..................................................................................................................... 12 5.5.2. DEMO running result ............................................................................................................ 12 5.6. SQPI_PSRAM ............................................................................................................. 12 5.6.1. DEMO purpose ..................................................................................................................... 12 5.6.2. DEMO running result ............................................................................................................ 13 5.7. USBD_CDC_ACM ...................................................................................................... 13 5.7.1. DEMO purpose ..................................................................................................................... 13 1/16 User Guide GD32EPRTV-START 5.7.2. DEMO running result ............................................................................................................ 13 6. REVISION HISTORY ............................................................................................... 15 2/16 User Guide GD32EPRTV-START List of Figures Figure 4-1. Schematic diagram of power supply ...................................................................................... 6 Figure 4-2. Schematic diagram of boot option ......................................................................................... 6 Figure 4-3. Schematic diagram of LED function ...................................................................................... 6 Figure 4-4. Schematic diagram of Key function ....................................................................................... 6 Figure 4-5. Schematic diagram of USART ................................................................................................ 7 Figure 4-6. Schematic diagram of USB ..................................................................................................... 7 Figure 4-7. Schematic diagram of Extension ............................................................................................ 7 Figure 4-8. Schematic diagram of GD-Link ............................................................................................... 8 Figure 4-10. Schematic diagram of MCU ................................................................................................... 9 3/16 User Guide GD32EPRTV-START List of Tables Table 2-1. Function pin assignment ........................................................................................................... 5 Table 6-1. Revision history ....................................................................................................................... 15 4/16 User Guide GD32EPRTV-START 1. Summary GD32EPRTV-START uses GD32EPRTVDT6 as the main controller. It uses GD-Link Mini USB interface to supply 5V power. Reset, Boot, K2-User Key, LED, USB and USART to USB interface are also included. For more details please refer to GD32EPRTV-START-Rev1.0 schematic. 2. Function Pin Assign Table 2-1. Function pin assignment Function Pin Description LED PC6 LED1 RESET KEY USART USB 3. K1-Reset PA0 User Key PB6 USART0_TX PB7 USART0_RX PA11 USB_DM PA12 USB_DP PA9 USB Pull-up Control Getting started The START board uses GD-Link Mini USB connecter to get power DC +5V, which is the hardware system normal work voltage. A GD-Link on board is necessary in order to download and debug programs. Select the correct boot mode and then power on, the LEDPWR will turn on, which indicates the power supply is OK. There are Keil version and IAR version of all projects. Keil version of the projects are created based on Keil MDK-ARM 5.26 uVision5. IAR version of the projects are created based on IAR Embedded Workbench for ARM 8.32.1. During use, the following points should be noted: 1. If you use Keil uVision5 to open the project. In order to solve the "Device Missing (s)" problem, you can install GigaDevice.GD32EPRT_DFP.1.1.0.pack. 2. If you use IAR to open the project, install IAR_GD32EPRT_ADDON_1.1.0.exe to load the associated files. 5/16 User Guide GD32EPRTV-START 4. Hardware layout overview 4.1. Power supply Figure 4-1. Schematic diagram of power supply P1 +5V 16V/10uF,AVX Vin E1 AMS1117-3.3 2 16V/10uF,AVX Vout 4 E2 C11 +3V3 R7 470Ω LEDPWR LED0603 1 SMD1210P050F U2 3 G +U5V 50V/0.1uF GND 4.2. Boot option Figure 4-2. Schematic diagram of boot option JP3 3 2 1 GNDR4 BOOT0 +3V3 10KΩ BOOT0 JP4 3 2 1 GNDR5 BOOT1 +3V3 10KΩ BOOT1 4.3. LED Figure 4-3. Schematic diagram of LED function LED PC6 LED1 R10 GND 470Ω 4.4. LED0603 KEY Figure 4-4. Schematic diagram of Key function +3V3 R11 10KΩ PA0 KEY K2 K-1102B C14 50V/0.1uF GND 6/16 User Guide GD32EPRTV-START 4.5. USART Figure 4-5. Schematic diagram of USART USART To USB +3V3 C19 USB_MiniAB receptacle CN3 VBUS DM DP ID GND 1 2 3 4 5 U3 DD+ D+ D- 1 2 3 4 5 UD+ V3 UDRXD GND TXD RTS# VCC CTS# TNOW 10 9 8 7 6 50V/0.01uF UART_TX PB6 UART_RX PB7 +3V3 C20 CH340E 50V/0.1uF Shield 6 Mini_USB C21 R17 1MΩ 50V/4700pF 4.6. USB Figure 4-6. Schematic diagram of USB USB USB_DM USB_DP R12 R13 R14 1 2 3 4 5 22Ω 22Ω 1.5KΩ VBUS DM DP ID GND GND C16 USB_MiniAB receptacle CN2 PA11 PA12 PA9 6 Shield R15 Mini_USB 1MΩ 50V/4700pF 4.7. Extension Figure 4-7. Schematic diagram of Extension 7/16 User Guide GD32EPRTV-START Extension Pin JP5 PC0 PC2 PA1 PA3 PA5 PA7 PC5 PB1 PE8 PE10 PE12 PE14 PB10 PB12 PB14 PD8 PD10 PD12 PD14 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 +3V3 JP6 PC1 PC3 PA2 PA4 PA6 PC4 PB0 PE7 PE9 PE11 PE13 PE15 PB11 PB13 PB15 PD9 PD11 PD13 PD15 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 PE6 PE4 PE2 PE0 PB8 PB6 PB4 PD7 PD5 PD3 PD1 PC12 PC10 PA15 PA13 PA8 PC8 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 +3V3 +5V GND HEADER 20X2 4.8. PC13 PE5 PE3 PE1 PB9 PB7 PB5 PB3 PD6 PD4 PD2 PD0 PC11 PA14 PA10 PC9 PC7 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 GND HEADER 20X2 GD-Link Figure 4-8. Schematic diagram of GD-Link U0 10 11 12 13 14 15 16 17 MCU SWD L_TMS/IO L_TCK/CLK L_TDO/SWO L_TDI +3V3 JP100 1 2 3 4 L_SWDIO L_SWDCK L_USB_Ctr 29 30 31 32 33 34 37 38 4×1P2.54 GND Reset L_USB_DM L_USB_DP L_SWDIO L_SWDCK +3V3 C100 L_OSC_IN GND L_OSC_IN 5 L_OSC_OUT 6 49S-8MHz 50V/20pF C102 Y101 R101 1MΩ L_OSC_OUT 50V/20pF R102 10KΩ L_NRST R104 44 10KΩ L_NRST 7 GND C103 50V/0.1uF 1 24 36 48 GND 9 +3V3 PA0-WKUP PA1 PA2 PA3 PA4 PA5 PA6 PA7 PB0 PB1 PB2/BOOT1 PB3/JTDO PB4/JNTRST PB5 PB6 PB7 PA8 PA9 PA10 PA11 PA12 PA13/JTMS/SWDIO PA14/JTCK/SWCLK PA15/JTDI PB8 PB9 PB10 PB11 PB12 PB13 PB14 PB15 18 19 20 39 40 41 42 43 R103 GND 10KΩ 45 46 21 22 25 26 27 28 L_TReset L_LED2R110 L_LED1R109 2 PC13-TAMPER-RTC 3 PC14-OSC32_IN 4 PC15-OSC32_OUT OSC_IN/PD0 OSC_OUT/PD1 LED0603 L_LED2 470Ω 470Ω L_LED1 LED0603 GND BOOT0 NRST VBAT VDD_1 VDD_2 VDD_3 VSS_1 VSS_2 VSS_3 VDDA VSSA 23 35 47 8 GD32F103C8T6 GND CN100 VCC DD+ ID GND SHELL +U5V 1 2 3 4 5 6 R105 R106 R107 22Ω L_USB_DM 22Ω L_USB_DP 1.5KΩ L_USB_Ctr +3V3 GND C105 Mini_USB C106 C107 C108 50V/0.1uF 50V/0.1uF 50V/0.1uF 50V/0.1uF R108 1MΩ C104 50V/4700pF GND GND 8/16 User Guide GD32EPRTV-START 4.9. MCU Figure 4-9. Schematic diagram of MCU U1 PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 SWD SWD +3V3 JP1 GDLink 1 2 3 4 JTMS/SWDIO L_TMS/IO JTCK/SWDCLK L_TCK/CLK NRST L_TReset 4×1P2.54 GND PA13 PA14 PA8 67 PA9 68 PA10 69 PA11 70 PA12 71 JTMS/SWDIO 72 JTCK/SWDCLK76 PA15 77 PB0 PB1 BOOT1 PB3 PB4 PB5 PB6 PB7 35 36 37 89 90 91 92 93 PB8 PB9 PB10 PB11 PB12 PB13 PB14 PB15 95 96 47 48 51 52 53 54 OSC_IN OSC_OUT 12 13 PB2 C8 49S-8MHz 50V/20pF C9 GND Y2 23 24 25 26 29 30 31 32 R3 1MΩ 50V/20pF BOOT0 94 NRST 14 20 21 +3V3 NC +3V3 6 +3V3 R6 10KΩ K1 NRST K-1102B C10 73 50 75 100 28 11 22 PA0-WKUP PA1 PA2 PA3 PA4 PA5 PA6 PA7 PA8 PA9 PA10 PA11 PA12 PA13/JTMS/SWDIO PA14/JTCK/SWCLK PA15/JTDI PB0 PB1 PB2/BOOT1 PB3/JTDO PB4/JNTRST PB5 PB6 PB7 PB8 PB9 PB10 PB11 PB12 PB13 PB14 PB15 OSC_IN OSC_OUT BOOT0 NRST VREFVREF+ PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 65 PC8 66 PC9 78 PC10 79 PC11 80 PC12 7 PC13-TAMPER-RTC 8 PC14-OSC32_IN 9 PC15-OSC32_OUT PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 PD8 PD9 PD10 PD11 PD12 PD13 PD14 PD15 PE0 PE1 PE2 PE3 PE4 PE5 PE6 PE7 VBAT PE8 PE9 PE10 PE11 PE12 PE13 PE14 PE15 VDD_1 VDD_2 VDD_3 VDD_4 VDD_5 VSS_1 VSS_2 VSS_3 VSS_4 VSS_5 VDDA VSSA NC 15 16 17 18 33 34 63 64 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8 PC9 PC10 PC11 PC12 PC13 OSC32_IN OSC32_OUT 81 82 83 84 85 86 87 88 PD0 PD1 PD2 PD3 PD4 PD5 PD6 PD7 55 56 57 58 59 60 61 62 PD8 PD9 PD10 PD11 PD12 PD13 PD14 PD15 97 98 1 2 3 4 5 38 PE0 PE1 PE2 PE3 PE4 PE5 PE6 PE7 39 40 41 42 43 44 45 46 PE8 PE9 PE10 PE11 PE12 PE13 PE14 PE15 49 74 99 27 10 C6 32.768KHz Y1 50V/10pF C7 GND 50V/10pF +3V3 C1 C2 C3 C4 C5 50V/0.1uF 50V/0.1uF 50V/0.1uF 50V/0.1uF 50V/0.1uF GND +3V3 C12 50V/0.1uF +3V3 C15 50V/0.01uF C13 50V/0.1uF C17 50V/0.01uF GND 19 GD32EPRTVDT6 50V/0.1uF GND 9/16 User Guide GD32EPRTV-START 5. Routine use guide 5.1. GPIO_Running_LED 5.1.1. DEMO purpose This demo includes the following functions of GD32 MCU: Learn to use GPIO control the LED Learn to use SysTick to generate 1ms delay GD32EPRTV-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 light the LED. 5.1.2. DEMO running result Download the program < 01_GPIO_Running_LED > to the START board, LED can light cycles. 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 GD32EPRTV-START-V1.0 board has 2 keys and 1 LED. The keys are User Key and Reset Key. The LED are controlled by GPIO. This demo will show how to use the User Key to control the LED1. When press down the User 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_Key_Polling_mode > to the START board, press down the User Key, LED1 will be turned on. Press down the User Key again, LED1 will be turned off. 10/16 User Guide GD32EPRTV-START 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 GD32EPRTV-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 on. The output information via the HyperTerminal is as following: 11/16 User Guide GD32EPRTV-START 5.5. TIMER_Key_EXTI 5.5.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 Learn to use TIMER to generate PWM GD32EPRTV-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 TIMER PWM to trigger EXTI interrupt to toggle the state of LED1 and 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.5.2. DEMO running result Download the program < 05_TIMER_Key_EXTI > to the START board, the LED1 is flashed once for test, press down the User Key, LED1 will be turned on. Press down the User Key again, LED1 will be turned off. Connect PA6 (TIMER2_CH0) and PA4 with DuPont line. The LED1 will be toggled every 500ms. 5.6. SQPI_PSRAM 5.6.1. DEMO purpose This demo includes the following functions of GD32 MCU: Learn to use the SQPI unit to read and write PSRAM with the SQPI interface 12/16 User Guide GD32EPRTV-START 5.6.2. DEMO running result The computer serial port line connected to the USART port of START board, set the baud rate of HyperTerminal software to 115200, 8 bits data bit, 1 bit stop bit. Download the program <06_SQPI_PSRAM> to the START board, the HyperTerminal software can observe the operation condition, 256 bytes data which are written to and read from PSRAM. Compare the data that were written to the PSRAM and the data that were read from the PSRAM. If they are the same, the serial port will output “SQPI read and write operation success”, otherwise, the serial port will output “SQPI read and write operation error”. 5.7. USBD_CDC_ACM 5.7.1. DEMO purpose This demo includes the following functions of GD32 MCU: Learn how to use the USBD peripheral Learn how to implement USB CDC device GD32EPRTV-START-V1.0 board has one USBD interface. In this demo, the GD32EPRTVSTART-V1.0 board is enumerated as an USB virtual COM port, which was shown in device manager of PC as below. This demo makes the USB device look like a serial port, and loops back the contents of a text file over USB port. To run the demo, input a message using the PC's keyboard. Any data that shows in HyperTerminal is received from the device. 5.7.2. DEMO running result Download the program <07_USBD_CDC_ACM> to the board and run. When you input message through computer keyboard, the HyperTerminal will receive and shown the message. For example, when you input “GigaDevice MCU”, the HyperTerminal will get and show it as below. 13/16 User Guide GD32EPRTV-START 14/16 User Guide GD32EPRTV-START 6. Revision history Table 6-1. Revision history Revision No. Description 1.0 Initial Release Date Sep.4, 2020 15/16 User Guide GD32EPRTV-START Important Notice This document is the property of GigaDevice Semiconductor Inc. and its subsidiaries (the "Company"). This document, including any product of the Company described in this document (the “Product”), is owned by the Company under the intellectual property laws and treaties of the People’s Republic of China and other jurisdictions worldwide. The Company reserves all rights under such laws and treaties and does not grant any license under its patents, copyrights, trademarks, or other intellectual property rights. The names and brands of third party referred thereto (if any) are the property of their respective owner and referred to for identification purposes only. The Company makes no warranty of any kind, express or implied, with regard to this document or any Product, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The Company does not assume any liability arising out of the application or use of any Product described in this document. Any information provided in this document is provided only for reference purposes. It is the responsibility of the user of this document to properly design, program, and test the functionality and safety of any application made of this information and any resulting product. Except for customized products which has been expressly identified in the applicable agreement, the Products are designed, developed, and/or manufactured for ordinary business, industrial, personal, and/or household applications only. The Products are not designed, intended, or authorized for use as components in systems designed or intended for the operation of weapons, weapons systems, nuclear installations, atomic energy control instruments, combustion control instruments, airplane or spaceship instruments, transportation instruments, traffic signal instruments, life-support devices or systems, other medical devices or systems (including resuscitation equipment and surgical implants), pollution control or hazardous substances management, or other uses where the failure of the device or Product could cause personal injury, death, property or environmental damage ("Unintended Uses"). Customers shall take any and all actions to ensure using and selling the Products in accordance with the applicable laws and regulations. The Company is not liable, in whole or in part, and customers shall and hereby do release the Company as well as it’s suppliers and/or distributors from any claim, damage, or other liability arising from or related to all Unintended Uses of the Products. Customers shall indemnify and hold the Company as well as it’s suppliers and/or distributors harmless from and against all claims, costs, damages, and other liabilities, including claims for personal injury or death, arising from or related to any Unintended Uses of the Products. Information in this document is provided solely in connection with the Products. The Company reserves the right to make changes, corrections, modifications or improvements to this document and Products and services described herein at any time, without notice. © 2020 GigaDevice – All rights reserved 16/16
advertisement
Related manuals
advertisement