|
| 1 | +.. _ch32v307v_evt_r1: |
| 2 | + |
| 3 | +WCH CH32V307V EVT R1 |
| 4 | +#################### |
| 5 | + |
| 6 | +.. image:: img/ch32v307v_evt_r1.jpg |
| 7 | + :align: center |
| 8 | + :alt: ch32v307v_evt_r1 |
| 9 | + |
| 10 | +Overview |
| 11 | +******** |
| 12 | + |
| 13 | +The WCH CH32V307V-EVT-R1 is a fully-featured development board. |
| 14 | +The board has FPU supported RISC-V processor, USB, Ethernet, |
| 15 | +and various and many basic peripherals. |
| 16 | + |
| 17 | +- `CH32V307V Page <http://www.wch-ic.com/products/CH32V307.html?>`_ |
| 18 | +- `CH32V307V Datasheet Download Page <http://www.wch-ic.com/downloads/CH32V20x_30xDS0_PDF.html>`_ |
| 19 | +- `CH32V307V Reference Manual Download Page <http://www.wch-ic.com/downloads/CH32FV2x_V3xRM_PDF.html>`_ |
| 20 | +- `QingKe V4 Processor Manual Download Page (Chinese) <https://www.wch.cn/downloads/QingKeV4_Processor_Manual_PDF.html>`_ |
| 21 | +- `GitHub Page (Firmware, board schematics, ...) <https://github.com/openwch/ch32v307>`_ |
| 22 | + |
| 23 | +Hardware |
| 24 | +******** |
| 25 | + |
| 26 | +- FPU supported 144MHz RISC-V processor |
| 27 | +- 64KB SRAM/256KB Flash |
| 28 | +- 80 x I/O ports |
| 29 | +- 3 x USART, 5 x UART |
| 30 | +- 2 x ADC(16 channel) |
| 31 | +- 2 x I2C |
| 32 | +- 3 x SPI |
| 33 | +- 2 x I2S |
| 34 | +- 2 x CAN |
| 35 | +- 2 x 12-bit DAC |
| 36 | +- 2 x basic 16-bit timer |
| 37 | +- 4 x universal 16-bit timer |
| 38 | +- 4 x advanced 16-bit timer |
| 39 | +- 1 x RTC |
| 40 | +- 1 x SysTick |
| 41 | +- 2 x Watchdog timer |
| 42 | +- 2 x DMA |
| 43 | +- 4 x Applifier |
| 44 | +- 1 x True random number generator |
| 45 | +- 1 x Digital Video Port |
| 46 | +- 1 x SDIO |
| 47 | +- 1 x USBFS(OTG) |
| 48 | +- 1 x USBHS |
| 49 | +- 1 x ETH(Gigabit Ethernet controller) |
| 50 | + |
| 51 | +Supported Features |
| 52 | +================== |
| 53 | + |
| 54 | +The board configuration supports the following hardware features: |
| 55 | + |
| 56 | +.. list-table:: |
| 57 | + :header-rows: 1 |
| 58 | + |
| 59 | + * - Peripheral |
| 60 | + - Kconfig option |
| 61 | + - Devicetree compatible |
| 62 | + * - WCH QingKe SysTick |
| 63 | + - :kconfig:option:`CONFIG_WCH_QINGKE_SYSTICK` |
| 64 | + - :dtcompatible:`wch,qingke-systick` |
| 65 | + * - WCH PFIC Interrupt Controller |
| 66 | + - :kconfig:option:`CONFIG_WCH_PFIC` |
| 67 | + - :dtcompatible:`wch,pfic` |
| 68 | + * - GPIO |
| 69 | + - :kconfig:option:`CONFIG_GPIO` |
| 70 | + - :dtcompatible:`gd,gd32-gpio` |
| 71 | + * - USART |
| 72 | + - :kconfig:option:`CONFIG_SERIAL` |
| 73 | + - :dtcompatible:`gd,gd32-usart` |
| 74 | + |
| 75 | +Serial Port |
| 76 | +=========== |
| 77 | + |
| 78 | +The USART1 connects to the P9 USB connector via WCH-Link. |
| 79 | +Connect the USB connecter and launch a terminal application on your PC |
| 80 | +to show the UART message. |
| 81 | + |
| 82 | +Onboard LED |
| 83 | +=========== |
| 84 | + |
| 85 | +The board has two onboard LEDs. But these are not connected to any GPIO pin. |
| 86 | +You need to connect the LED pin with any GPIO pin in connectors to light it. |
| 87 | +The default configuration uses PB13, the Arduino LED pin, as the LED pin. |
| 88 | + |
| 89 | +Programming and debugging |
| 90 | +************************* |
| 91 | + |
| 92 | +Building & Flashing |
| 93 | +=================== |
| 94 | + |
| 95 | +You'll need OpenOCD with WCH CH32V series support to upload the application |
| 96 | +to the device. First, download the binaries for your OS from the |
| 97 | +`MounRiver Studio download page <http://mounriver.com/download>`_. |
| 98 | +(MounRiver Studio contains WCH CH32V supported OpenOCD binaries.) |
| 99 | + |
| 100 | +The Zephyr SDK uses a bundled version of OpenOCD by default. You can |
| 101 | +overwrite that behavior by adding the |
| 102 | +``-DOPENOCD=<path/to/riscv-openocd/bin/openocd>`` |
| 103 | +parameter when building: |
| 104 | + |
| 105 | +Here is an example of building the :ref:`blinky-sample` application. |
| 106 | + |
| 107 | +.. zephyr-app-commands:: |
| 108 | + :zephyr-app: samples/basic/blinky |
| 109 | + :board: ch32v307v_evt_r1 |
| 110 | + :goals: build flash |
| 111 | + :gen-args: -DOPENOCD=<path/to/riscv-openocd/bin/openocd> |
| 112 | + |
| 113 | +Debugging |
| 114 | +========= |
| 115 | + |
| 116 | +You can debug an application in the usual way. Here is an example for the |
| 117 | +:ref:`blinky-sample` application. |
| 118 | + |
| 119 | +.. zephyr-app-commands:: |
| 120 | + :zephyr-app: samples/basic/blinky |
| 121 | + :board: ch32v307v_evt_r1 |
| 122 | + :maybe-skip-config: |
| 123 | + :goals: debug |
| 124 | + :gen-args: -DOPENOCD=<path/to/riscv-openocd/bin/openocd> |
0 commit comments