|
| 1 | +.. zephyr:board:: ch32v003evt |
| 2 | +
|
| 3 | +Overview |
| 4 | +******** |
| 5 | + |
| 6 | +The `WCH`_ CH32V003EVT hardware provides support for QingKe 32-bit RISC-V2A |
| 7 | +processor and the following devices: |
| 8 | + |
| 9 | +* CLOCK |
| 10 | +* :abbr:`GPIO (General Purpose Input Output)` |
| 11 | +* :abbr:`NVIC (Nested Vectored Interrupt Controller)` |
| 12 | + |
| 13 | +The board is equipped with two LEDs. The `WCH webpage on CH32V003`_ contains |
| 14 | +the processor's information and the datasheet. |
| 15 | + |
| 16 | +Hardware |
| 17 | +******** |
| 18 | + |
| 19 | +The QingKe 32-bit RISC-V2A processor of the WCH CH32V003EVT is clocked by an |
| 20 | +external crystal and runs at 48 MHz. |
| 21 | + |
| 22 | +Supported Features |
| 23 | +================== |
| 24 | + |
| 25 | +The ``ch32v003evt`` board target supports the following hardware features: |
| 26 | + |
| 27 | ++-----------+------------+----------------------+ |
| 28 | +| Interface | Controller | Driver/Component | |
| 29 | ++===========+============+======================+ |
| 30 | +| CLOCK | on-chip | clock_control | |
| 31 | ++-----------+------------+----------------------+ |
| 32 | +| GPIO | on-chip | gpio | |
| 33 | ++-----------+------------+----------------------+ |
| 34 | +| PWM | on-chip | pwm | |
| 35 | ++-----------+------------+----------------------+ |
| 36 | +| PINCTRL | on-chip | pinctrl | |
| 37 | ++-----------+------------+----------------------+ |
| 38 | +| TIMER | on-chip | timer | |
| 39 | ++-----------+------------+----------------------+ |
| 40 | +| UART | on-chip | uart | |
| 41 | ++-----------+------------+----------------------+ |
| 42 | + |
| 43 | +Other hardware features have not been enabled yet for this board. |
| 44 | + |
| 45 | +Connections and IOs |
| 46 | +=================== |
| 47 | + |
| 48 | +LED |
| 49 | +--- |
| 50 | + |
| 51 | +* LED1 = Unconnected. Connect to an I/O pin (PD4). |
| 52 | + |
| 53 | +Programming and Debugging |
| 54 | +************************* |
| 55 | + |
| 56 | +Applications for the ``ch32v003evt`` board target can be built and flashed |
| 57 | +in the usual way (see :ref:`build_an_application` and :ref:`application_run` |
| 58 | +for more details); however, an external programmer is required since the board |
| 59 | +does not have any built-in debug support. |
| 60 | + |
| 61 | +The following pins of the external programmer must be connected to the |
| 62 | +following pins on the PCB (see image): |
| 63 | + |
| 64 | +* VCC = VCC (do not power the board from the USB port at the same time) |
| 65 | +* GND = GND |
| 66 | +* SWIO = PD1 |
| 67 | + |
| 68 | +Flashing |
| 69 | +======== |
| 70 | + |
| 71 | +You can use ``minichlink`` to flash the board. Once ``minichlink`` has been set |
| 72 | +up, build and flash applications as usual (see :ref:`build_an_application` and |
| 73 | +:ref:`application_run` for more details). |
| 74 | + |
| 75 | +Here is an example for the :zephyr:code-sample:`blinky` application. |
| 76 | + |
| 77 | +.. zephyr-app-commands:: |
| 78 | + :zephyr-app: samples/basic/blinky |
| 79 | + :board: ch32v003evt |
| 80 | + :goals: build flash |
| 81 | + |
| 82 | +Debugging |
| 83 | +========= |
| 84 | + |
| 85 | +This board can be debugged via OpenOCD or ``minichlink``. |
| 86 | + |
| 87 | +Testing the LED on the WCH CH32V003EVT |
| 88 | +************************************** |
| 89 | + |
| 90 | +There is 1 sample program that allow you to test that the LED on the board is |
| 91 | +working properly with Zephyr: |
| 92 | + |
| 93 | +.. code-block:: console |
| 94 | +
|
| 95 | + samples/basic/blinky |
| 96 | +
|
| 97 | +You can build and flash the examples to make sure Zephyr is running |
| 98 | +correctly on your board. The button and LED definitions can be found |
| 99 | +in :zephyr_file:`boards/wch/ch32v003evt/ch32v003evt.dts`. |
| 100 | + |
| 101 | +References |
| 102 | +********** |
| 103 | + |
| 104 | +.. target-notes:: |
| 105 | + |
| 106 | +.. _WCH: http://www.wch-ic.com |
| 107 | +.. _WCH webpage on CH32V003: https://www.wch-ic.com/products/CH32V003.html |
0 commit comments