1.. _gd32e103v_eval: 2 3GigaDevice GD32E103V-EVAL 4######################### 5 6 7Overview 8******** 9 10The GD32E103V-EVAL board is a hardware platform that enables design and debug 11of the GigaDevice E103 Cortex-M4F High Performance MCU. 12 13The GD32E103VB features a single-core ARM Cortex-M4F MCU which can run up 14to 120-MHz with flash accesses zero wait states, 128kiB of Flash, 32kiB of 15SRAM and 80 GPIOs. 16 17.. image:: img/gd32e103v_eval.jpg 18 :align: center 19 :alt: gd32e103v_eval 20 21 22Hardware 23******** 24 25- USB interface with mini-USB connector 26- 4 user LEDs 27- 4 user push buttons 28- Reset Button 29- ADC connected to a potentiometer 30- 2 DAC channels 31- GD25Q16 2Mib SPI Flash 32- AT24C02C 2KiB EEPROM 33- 3.2 TFT LCD (320x240) 34- PCM1770 Stereo DAC with Headphone Amplifier 35- GD-Link interface 36 37 - CMSIS-DAP swd debug interface over USB HID. 38 39- 2 CAN port(support CAN-FD) 40 41 - This function is not available in this board due to hardware issues, please check ``GD32C103`` . 42 43For more information about the GD32E103 SoC and GD32E103V-EVAL board: 44 45- `GigaDevice Cortex-M4F High Performance SoC Website`_ 46- `GD32E103 Datasheet`_ 47- `GD32E103 Reference Manual`_ 48- `GD32E103V Eval Schematics`_ 49- `GD32 ISP Console`_ 50 51 52Supported Features 53================== 54 55The board configuration supports the following hardware features: 56 57.. list-table:: 58 :header-rows: 1 59 60 * - Peripheral 61 - Kconfig option 62 - Devicetree compatible 63 * - NVIC 64 - N/A 65 - :dtcompatible:`arm,v7m-nvic` 66 * - SYSTICK 67 - N/A 68 - N/A 69 * - USART 70 - :kconfig:option:`CONFIG_SERIAL` 71 - :dtcompatible:`gd,gd32-usart` 72 73 74Serial Port 75=========== 76 77The GD32E103V-EVAL board has 5 serial communication ports. The default port 78is UART0 at PIN-9 and PIN-10. 79 80Programming and Debugging 81************************* 82 83Before program your board make sure to configure boot setting and serial port. 84The default serial port is USART0. This port uses header JP-5/6 to route 85signals between USB VBUS/ID and USART J2. 86 87+--------+--------+------------+ 88| Boot-0 | Boot-1 | Function | 89+========+========+============+ 90| 1-2 | 1-2 | SRAM | 91+--------+--------+------------+ 92| 1-2 | 2-3 | Bootloader | 93+--------+--------+------------+ 94| 2-3 | Any | Flash | 95+--------+--------+------------+ 96 97+------+------+-------------+ 98| JP-5 | JP-6 | Function | 99+======+======+=============+ 100| 1-2 | 1-2 | USART0 / J2 | 101+------+------+-------------+ 102| 2-3 | 2-3 | USB VBUS/ID | 103+------+------+-------------+ 104| open | open | Free | 105+------+------+-------------+ 106 107Using GD-Link 108============= 109 110The GD32E103V-EVAL includes an onboard programmer/debugger (GD-Link) which 111allow flash programming and debug over USB. There are also program and debug 112headers J1 and J100 that can be used with any ARM compatible tools. 113 114#. Build the Zephyr kernel and the :ref:`hello_world` sample application: 115 116 .. zephyr-app-commands:: 117 :zephyr-app: samples/hello_world 118 :board: gd32e103v_eval 119 :goals: build 120 :compact: 121 122#. Run your favorite terminal program to listen for output. Under Linux the 123 terminal should be :code:`/dev/ttyUSB0`. For example: 124 125 .. code-block:: console 126 127 $ minicom -D /dev/ttyUSB0 -o 128 129 The -o option tells minicom not to send the modem initialization 130 string. Connection should be configured as follows: 131 132 - Speed: 115200 133 - Data: 8 bits 134 - Parity: None 135 - Stop bits: 1 136 137#. To flash an image: 138 139 .. zephyr-app-commands:: 140 :zephyr-app: samples/hello_world 141 :board: gd32e103v_eval 142 :goals: flash 143 :compact: 144 145 You should see "Hello World! gd32e103v_eval" in your terminal. 146 147#. To debug an image: 148 149 .. zephyr-app-commands:: 150 :zephyr-app: samples/hello_world 151 :board: gd32e103v_eval 152 :goals: debug 153 :compact: 154 155 156Using ROM bootloader 157==================== 158 159The GD32E103 MCU have a ROM bootloader which allow flash programming. User 160should install `GD32 ISP Console`_ software at some Linux path. The recommended 161is :code:`$HOME/.local/bin`. 162 163#. Build the Zephyr kernel and the :ref:`hello_world` sample application: 164 165 .. zephyr-app-commands:: 166 :zephyr-app: samples/hello_world 167 :board: gd32e103v_eval 168 :goals: build 169 :compact: 170 171#. Enable board bootloader: 172 173 - Remove boot-0 jumper 174 - press reset button 175 176#. To flash an image: 177 178 .. code-block:: console 179 180 west build -b gd32e103v_eval samples/hello_world 181 west flash -r gd32isp [--port=/dev/ttyUSB0] 182 183#. Run your favorite terminal program to listen for output. Under Linux the 184 terminal should be :code:`/dev/ttyUSB0`. For example: 185 186 .. code-block:: console 187 188 $ minicom -D /dev/ttyUSB0 -o 189 190 The -o option tells minicom not to send the modem initialization 191 string. Connection should be configured as follows: 192 193 - Speed: 115200 194 - Data: 8 bits 195 - Parity: None 196 - Stop bits: 1 197 198 Press reset button 199 200 You should see "Hello World! gd32e103v_eval" in your terminal. 201 202 203.. _GigaDevice Cortex-M4F High Performance SoC Website: 204 https://www.gigadevice.com/products/microcontrollers/gd32/arm-cortex-m4/value-line/gd32e103-series/ 205 206.. _GD32E103 Datasheet: 207 http://www.gd32mcu.com/download/down/document_id/235/path_type/1 208 209.. _GD32E103 Reference Manual: 210 http://www.gd32mcu.com/download/down/document_id/163/path_type/1 211 212.. _GD32E103V Eval Schematics: 213 http://www.gd32mcu.com/download/down/document_id/178/path_type/1 214 215.. _GD32 ISP Console: 216 http://www.gd32mcu.com/download/down/document_id/175/path_type/1 217