1.. zephyr:board:: gd32f470i_eval
2
3Overview
4********
5
6The GD32F470I-EVAL board is a hardware platform that enables prototyping
7on GD32F470IK Cortex-M4F Stretch Performance MCU.
8
9The GD32F470IK features a single-core ARM Cortex-M4F MCU which can run up
10to 240 MHz with flash accesses zero wait states, 3072kiB of Flash, 256kiB of
11SRAM and 140 GPIOs.
12
13Hardware
14********
15
16- GD32F470IKH6 MCU
17- 2Kb EEPROM
18- 16Mbit SPI and QSPI NOR Flash
19- 256Mbit SDRAM
20- 3 x User LEDs
21- 3 x User Push buttons
22- 1 x USART (RS-232 at J1 connector)
23- 1 x POT connected to an ADC input
24- Headphone interface
25- Micro SD Card Interface
26- USB FS connector
27- USB HS connector
28- 1 x CAN
29- Ethernet Interface
30- 4.3" LCD (480x272)
31- OV2640 Digital Camera
32- GD-Link on board programmer
33- J-Link/JTAG connector
34
35For more information about the GD32F470 SoC and GD32F470I-EVAL board:
36
37- `GigaDevice Cortex-M4F Stretch Performance SoC Website`_
38- `GD32F470IKH6 Specifications`_
39- `GD32F470xx Datasheet`_
40- `GD32F4xx User Manual`_
41
42Supported Features
43==================
44
45The board configuration supports the following hardware features:
46
47.. list-table::
48   :header-rows: 1
49
50   * - Peripheral
51     - Kconfig option
52     - Devicetree compatible
53   * - EXTI
54     - :kconfig:option:`CONFIG_GD32_EXTI`
55     - :dtcompatible:`gd,gd32-exti`
56   * - GPIO
57     - :kconfig:option:`CONFIG_GPIO`
58     - :dtcompatible:`gd,gd32-gpio`
59   * - NVIC
60     - N/A
61     - :dtcompatible:`arm,v7m-nvic`
62   * - PWM
63     - :kconfig:option:`CONFIG_PWM`
64     - :dtcompatible:`gd,gd32-pwm`
65   * - SYSTICK
66     - N/A
67     - N/A
68   * - USART
69     - :kconfig:option:`CONFIG_SERIAL`
70     - :dtcompatible:`gd,gd32-usart`
71   * - DAC
72     - :kconfig:option:`CONFIG_DAC`
73     - :dtcompatible:`gd,gd32-dac`
74   * - I2C
75     - :kconfig:option:`CONFIG_I2C`
76     - :dtcompatible:`gd,gd32-i2c`
77   * - EEPROM
78     - :kconfig:option:`CONFIG_EEPROM`
79     - :dtcompatible:`atmel,at24`
80   * - SPI
81     - :kconfig:option:`CONFIG_SPI`
82     - :dtcompatible:`gd,gd32-spi`
83
84Serial Port
85===========
86
87The GD32F470I-EVAL board has one serial communication port. The default port
88is USART0 with TX connected at PA9 and RX at PA10.
89
90Programming and Debugging
91*************************
92
93Before programming your board make sure to configure boot and serial jumpers
94as follows:
95
96- J2/3: Select 2-3 for both (boot from user memory)
97- J5: Select 1-2 position (labeled as ``USART0``)
98
99Using GD-Link
100=============
101
102The GD32F470I-EVAL includes an onboard programmer/debugger (GD-Link) which
103allows flash programming and debugging over USB. There is also a JTAG header
104(J1) which can be used with tools like Segger J-Link.
105
106#. Build the Zephyr kernel and the :zephyr:code-sample:`hello_world` sample application:
107
108   .. zephyr-app-commands::
109      :zephyr-app: samples/hello_world
110      :board: gd32f470i_eval
111      :goals: build
112      :compact:
113
114#. Run your favorite terminal program to listen for output. On Linux the
115   terminal should be something like ``/dev/ttyUSB0``. For example:
116
117   .. code-block:: console
118
119      minicom -D /dev/ttyUSB0 -o
120
121   The -o option tells minicom not to send the modem initialization
122   string. Connection should be configured as follows:
123
124      - Speed: 115200
125      - Data: 8 bits
126      - Parity: None
127      - Stop bits: 1
128
129#. To flash an image:
130
131   .. zephyr-app-commands::
132      :zephyr-app: samples/hello_world
133      :board: gd32f470i_eval
134      :goals: flash
135      :compact:
136
137   You should see "Hello World! gd32f470i_eval" in your terminal.
138
139#. To debug an image:
140
141   .. zephyr-app-commands::
142      :zephyr-app: samples/hello_world
143      :board: gd32f470i_eval
144      :goals: debug
145      :compact:
146
147
148.. _GigaDevice Cortex-M4F Stretch Performance SoC Website:
149   https://www.gigadevice.com/products/microcontrollers/gd32/arm-cortex-m4/stretch-performance-line/gd32f470-series/
150
151.. _GD32F470IKH6 Specifications:
152   https://www.gigadevice.com/microcontroller/gd32f470ikh6/
153
154.. _GD32F470xx Datasheet:
155   https://gd32mcu.com/data/documents/datasheet/GD32F470xx_Datasheet_Rev1.3.pdf
156
157.. _GD32F4xx User Manual:
158   https://gd32mcu.com/data/documents/userManual/GD32F4xx_User_Manual_Rev2.7.pdf
159