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