1.. zephyr:board:: gd32f350r_eval
2
3Overview
4********
5
6The GD32F350R-EVAL board is a hardware platform that enables design and debug
7of the GigaDevice F350 Cortex-M4F High Performance MCU.
8
9The GD32F350RBT6 features a single-core ARM Cortex-M4F MCU which can run up
10to 108-MHz with flash accesses zero wait states, 128kB of Flash, 16kB of
11SRAM and 55 GPIOs.
12
13Hardware
14********
15
16- GD32F350RBT6 MCU
17- AT24C02C 2Kb EEPROM
18- 4 x User LEDs
19- 4 x User Push buttons
20- 1 x USART (RS-232 at J2 connector)
21- 1 x POT connected to an ADC input
22- Headphone interface
23- Micro SD Card Interface
24- 2.4'' TFT-LCD (36x48)
25- GD-Link on board programmer
26- J-Link/SWD connector
27
28For more information about the GD32F350 SoC and GD32F350R-EVAL board:
29
30- `GigaDevice Cortex-M4F Stretch Performance SoC Website`_
31- `GD32F350xx Datasheet`_
32- `GD32F3x0 User Manual`_
33- `GD32F350R-EVAL User Manual`_
34
35Supported Features
36==================
37
38The board configuration supports the following hardware features:
39
40.. list-table::
41   :header-rows: 1
42
43   * - Peripheral
44     - Kconfig option
45     - Devicetree compatible
46   * - NVIC
47     - N/A
48     - :dtcompatible:`arm,v7m-nvic`
49   * - SYSTICK
50     - N/A
51     - N/A
52   * - USART
53     - :kconfig:option:`CONFIG_SERIAL`
54     - :dtcompatible:`gd,gd32-usart`
55   * - PINMUX
56     - :kconfig:option:`CONFIG_PINCTRL`
57     - :dtcompatible:`gd,gd32-pinctrl-af`
58   * - ADC
59     - :kconfig:option:`CONFIG_ADC`
60     - :dtcompatible:`gd,gd32-adc`
61
62Serial Port
63===========
64
65The GD32F350R-EVAL board has one serial communication port. The default port
66is USART0 with TX connected at PA9 and RX at PA10.
67
68Programming and Debugging
69*************************
70
71Before programming your board make sure to configure boot and serial jumpers as follows:
72
73- J4:  Select 2-3 for both (labeled as ``L``)
74- J13: Select 1-2 position (labeled as ``USART``)
75
76Using GD-Link
77=============
78
79The GD32F350R-EVAL includes an onboard programmer/debugger (GD-Link) which
80allows flash programming and debugging over USB. There is also a SWD header
81(J3) which can be used with tools like Segger J-Link.
82
83#. Build the Zephyr kernel and the :zephyr:code-sample:`hello_world` sample application:
84
85   .. zephyr-app-commands::
86      :zephyr-app: samples/hello_world
87      :board: gd32f350r_eval
88      :goals: build
89      :compact:
90
91#. Run your favorite terminal program to listen for output. On Linux the
92   terminal should be something like ``/dev/ttyUSB0``. For example:
93
94   .. code-block:: console
95
96      minicom -D /dev/ttyUSB0 -o
97
98   The -o option tells minicom not to send the modem initialization
99   string. Connection should be configured as follows:
100
101      - Speed: 115200
102      - Data: 8 bits
103      - Parity: None
104      - Stop bits: 1
105
106#. To flash an image:
107
108   .. zephyr-app-commands::
109      :zephyr-app: samples/hello_world
110      :board: gd32f350r_eval
111      :goals: flash
112      :compact:
113
114   You should see "Hello World! gd32f350r_eval" in your terminal.
115
116#. To debug an image:
117
118   .. zephyr-app-commands::
119      :zephyr-app: samples/hello_world
120      :board: gd32f350r_eval
121      :goals: debug
122      :compact:
123
124.. _GigaDevice Cortex-M4F Stretch Performance SoC Website:
125   https://www.gigadevice.com/products/microcontrollers/gd32/arm-cortex-m4/stretch-performance-line/
126
127.. _GD32F350xx Datasheet:
128   http://gd32mcu.com/download/down/document_id/133/path_type/1
129
130.. _GD32F3x0 User Manual:
131   http://gd32mcu.com/download/down/document_id/136/path_type/1
132
133.. _GD32F350R-EVAL User Manual:
134   https://www.tme.com/Document/ff0a3609934053c07d78ef8662781da9/GD32350R-EVAL%20User%20Manual-V1.0.pdf
135