1.. _gd32f407v_start: 2 3GigaDevice GD32F407V-START 4########################## 5 6Overview 7******** 8 9The GD32F407V-START board is a hardware platform that enables prototyping 10on GD32F407VE Cortex-M4 High Performance MCU. 11 12The GD32F407VE features a single-core ARM Cortex-M4 MCU which can run up 13to 168 MHz with flash accesses zero wait states, 3072kiB of Flash, 192kiB of 14SRAM and 82 GPIOs. 15 16.. image:: img/gd32f407v_start.jpg 17 :align: center 18 :alt: gd32f407v_start 19 20Hardware 21******** 22 23- GD32F407VET6 MCU 24- 1 x User LEDs 25- 1 x User Push buttons 26- 1 x USART 27- GD-Link on board programmer 28- J-Link/SWD connector 29 30For more information about the GD32F407 SoC and GD32F407V-START board: 31 32- `GigaDevice Cortex-M4 High Performance SoC Website`_ 33- `GD32F407X Datasheet`_ 34- `GD32F40X User Manual`_ 35- `GD32F407V-START User Manual`_ 36 37Supported Features 38================== 39 40The board configuration supports the following hardware features: 41 42.. list-table:: 43 :header-rows: 1 44 45 * - Peripheral 46 - Kconfig option 47 - Devicetree compatible 48 * - EXTI 49 - :kconfig:option:`CONFIG_GD32_EXTI` 50 - :dtcompatible:`gd,gd32-exti` 51 * - GPIO 52 - :kconfig:option:`CONFIG_GPIO` 53 - :dtcompatible:`gd,gd32-gpio` 54 * - NVIC 55 - N/A 56 - :dtcompatible:`arm,v7m-nvic` 57 * - PWM 58 - :kconfig:option:`CONFIG_PWM` 59 - :dtcompatible:`gd,gd32-pwm` 60 * - SYSTICK 61 - N/A 62 - N/A 63 * - USART 64 - :kconfig:option:`CONFIG_SERIAL` 65 - :dtcompatible:`gd,gd32-usart` 66 67Other peripherals may be used if shields are connected to the board. 68 69Serial Port 70=========== 71 72The GD32F407V-START board has one serial communication port. The default port 73is USART0 with TX connected at PB6 and RX at PB7. 74 75Programming and Debugging 76************************* 77 78Before programming your board make sure to configure boot jumpers as 79follows: 80 81- JP3/4: Select 2-3 for both (boot from user memory) 82 83Using GD-Link or J-Link 84======================= 85 86The board comes with an embedded GD-Link programmer. 87You need to install CMSIS-Pack which is required by pyOCD 88when programming or debugging by the GD-Link programmer. 89Execute the following command to install CMSIS-Pack for GD32F407VK 90if not installed yet. 91 92 .. code-block:: console 93 94 pyocd pack install gd32f407vk 95 96Also, J-Link can be used to program the board via the SWD interface 97(PA13/SWDIO and PA14/SWCLK in the JP6 header). 98 99#. Build the Zephyr kernel and the :ref:`hello_world` sample application: 100 101 .. zephyr-app-commands:: 102 :zephyr-app: samples/hello_world 103 :board: gd32f407v_start 104 :goals: build 105 :compact: 106 107#. Connect Serial-USB adapter to PB6, PB7, and GND. 108 109#. Run your favorite terminal program to listen for output. On Linux the 110 terminal should be something like ``/dev/ttyUSB0``. For example: 111 112 .. code-block:: console 113 114 minicom -D /dev/ttyUSB0 -o 115 116 The -o option tells minicom not to send the modem initialization 117 string. Connection should be configured as follows: 118 119 - Speed: 115200 120 - Data: 8 bits 121 - Parity: None 122 - Stop bits: 1 123 124#. To flash an image: 125 126 .. zephyr-app-commands:: 127 :zephyr-app: samples/hello_world 128 :board: gd32f407v_start 129 :goals: flash 130 :compact: 131 132 When using J-Link, append ``--runner jlink`` option after ``west flash``. 133 134 You should see "Hello World! gd32f407v_start" in your terminal. 135 136#. To debug an image: 137 138 .. zephyr-app-commands:: 139 :zephyr-app: samples/hello_world 140 :board: gd32f407v_start 141 :goals: debug 142 :compact: 143 144 When using J-Link, append ``--runner jlink`` option after ``west debug``. 145 146.. _GigaDevice Cortex-M4 High Performance SoC Website: 147 https://www.gigadevice.com/products/microcontrollers/gd32/arm-cortex-m4/high-performance-line/ 148 149.. _GD32F407X Datasheet: 150 https://gd32mcu.com/data/documents/datasheet/GD32F407xx_Datasheet_Rev2.5.pdf 151 152.. _GD32F40X User Manual: 153 https://gd32mcu.com/data/documents/userManual/GD32F4xx_User_Manual_Rev2.7.pdf 154 155.. _GD32F407V-START User Manual: 156 https://www.gd32mcu.com/data/documents/evaluationBoard/GD32F4xx_Demo_Suites_V2.6.1.rar 157