WeActStudio CH32V00xCoreBoard
Overview
The WeAct [1] CH32V00xCoreBoard is an evaluation board for the RISC-V based WCH [3] CH32V006F8U6 SOC.
The board is equipped with a LED, button, and USB port for power. The WeAct Github page [2] includes details, schematics, and links out to the CH32V006 user manual.
Hardware
QingKe V2C 32-bit RISC-V processor at up to 48 MHz
8 KiB of RAM and 62 KiB of flash
Internal 24 MHz high speed oscillator
USB port for power
2 UARTs, 1 I2C, 1 SPI, and 31 GPIOs
3 timers with PWM
See the datasheet for more.
Supported Features
The ch32v00x_core board supports the hardware features listed below.
- on-chip / on-board
- Feature integrated in the SoC / present on the board.
- 2 / 2
-
Number of instances that are enabled / disabled.
Click on the label to see the first instance of this feature in the board/SoC DTS files. -
vnd,foo -
Compatible string for the Devicetree binding matching the feature.
Click on the link to view the binding documentation.
ch32v00x_core/ch32v006 target
On-target memory for this board target: 8 KiB of RAM, 62 KiB of Flash.
Type |
Location |
Description |
Compatible |
|---|---|---|---|
CPU |
on-chip |
WCH QingKe V2 RISC-V MCU1 |
|
Clock control |
on-chip |
WCH CH32V00x Reset and Clock Control (RCC)1 |
|
on-chip |
WCH CH32V00x HSE Clock1 |
||
on-chip |
WCH CH32V00x HSI Clock1 |
||
on-chip |
Generic fixed-rate clock provider1 |
||
on-chip |
WCH CH32V00x PLL1 |
||
Counter |
on-chip |
WCH Advanced-control Timer (ADTM) for PWM1 |
|
on-chip |
WCH General-purpose Timer (GPTM)1 |
||
DMA |
on-chip |
WCH DMA controller1 |
|
GPIO & Headers |
on-chip |
WCH CH32V00x General-Purpose Input/Output (GPIO)4 |
|
I2C |
on-chip |
WCH I2C controller1 |
|
Input |
on-board |
Group of GPIO-bound input keys1 |
|
Interrupt controller |
on-chip |
WCH CH32V00x Programmable Fast Interrupt Controller (PFIC)1 |
|
on-chip |
WCH CH32V003/20x/30x External Interrupt and Event Controller (EXTI)1 |
||
LED |
on-board |
Group of GPIO-controlled LEDs1 |
|
on-board |
Group of PWM-controlled LEDs1 |
||
MTD |
on-chip |
Flash node1 |
|
Pin control |
on-chip |
WCH CH32V00x Alternate Function (AFIO)1 |
|
PWM |
on-chip |
WCH Advanced-control Timer (ADTM) for PWM1 |
|
on-chip |
WCH General-purpose Timer (GPTM) for PWM1 |
||
Serial controller |
on-chip |
WCH SDI console1 |
|
on-chip |
|||
SPI |
on-chip |
WCH SPI1 |
|
SRAM |
on-chip |
Generic on-chip SRAM1 |
|
Timer |
on-chip |
WCH CH32V00x Systick1 |
|
Watchdog |
on-chip |
WCH Independent Watchdog (IWDG)1 |
Connections and IOs
LED1 on PC4
User button on PD7
USART1 TX on PC0 and RX on PC1
PD7 is also the RST pin and should be reconfigured from RST to GPIO mode,
such as by running minichlink -D.
PD3, PD4, and PD5 are connected to the to the USB data lines and should be left floating. The only usable USART2 pinctrl configuration uses PD3 so, if USART2 is needed, remove SB4 or power the board externally.
Programming and Debugging
The ch32v00x_core board supports the runners and associated west commands listed below.
| flash | debug | debugserver | attach | rtt | |
|---|---|---|---|---|---|
| minichlink | ✅ (default) | ||||
| openocd | ✅ | ✅ (default) | ✅ | ✅ | ✅ |
| wchisp | ✅ | ||||
| wlink | ✅ |
Applications for the ch32v00x_core board can be built and flashed
in the usual way (see Building an Application and Run an Application
for more details); however, an external programmer is required since the board
does not have any built-in debug support.
Connect the programmer to the following pins on the PCB:
VCC = VCC (do not power the board from the USB port at the same time)
GND = GND
SWIO = PD1
Flashing
You can use minichlink [4] to flash the board. Once minichlink has been set
up, build and flash applications as usual (see Building an Application and
Run an Application for more details).
Here is an example for the Blinky application.
# From the root of the zephyr repository
west build -b ch32v00x_core samples/basic/blinky
west flash
Debugging
This board can be debugged via OpenOCD or minichlink.
Testing the LED
The blinky sample can be used to test that the LEDs on the board are working
properly with Zephyr:
You can build and flash the examples to make sure Zephyr is running correctly on your board. The LED definitions can be found in boards/weact/ch32v00x_core/ch32v00x_core.dts.