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