BluePill Plus CH32V203

Overview

The WeActStudio [1] BluePill Plus CH32V203 hardware provides support for QingKe V4B 32-bit RISC-V processor and the following devices:

  • CLOCK

  • GPIO

  • NVIC

  • UART

The board is equipped with two LEDs and three Buttons. User can use one of the LEDs and one of the buttons. The WCH webpage on CH32V203 [2] contains the processor’s manuals. The WeActStudio webpage on BPP [3] contains the BluePill’s schematic.

Hardware

The QingKe V4B 32-bit RISC-V processor of the BluePill Plus CH32V203 is clocked by an external 8 MHz crystal or the internal 8 MHz oscillator and runs up to 144 MHz. The CH32V203 SoC Features 2-4 USART, 4 GPIO ports, 1-2 SPI, 0-2 I2C, 9-16 ADC, RTC, CAN, USB Device, USB Host, OPA, and several timers.

Supported Features

The bluepillplus_ch32v203 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.
bluepillplus_ch32v203
/
ch32v203

Type

Location

Description

Compatible

CPU

on-chip

WCH QingKe V4B RISC-V MCU1

wch,qingke-v4b

Clock control

on-chip

WCH CH32V00x Reset and Clock Control (RCC)1

wch,rcc

on-chip

WCH CH32V00x HSE Clock1

wch,ch32v00x-hse-clock

on-chip

WCH CH32V00x HSI Clock1

wch,ch32v00x-hsi-clock

on-chip

Generic fixed-rate clock provider1

fixed-clock

on-chip

WCH CH32V20x/30x PLL1

wch,ch32v20x_30x-pll-clock

GPIO & Headers

on-chip

WCH CH32V00x General-Purpose Input/Output (GPIO)4

wch,gpio

Input

on-board

Group of GPIO-bound input keys1

gpio-keys

Interrupt controller

on-chip

WCH CH32V00x Programmable Fast Interrupt Controller (PFIC)1

wch,pfic

LED

on-board

Group of GPIO-controlled LEDs1

gpio-leds

MTD

on-chip

Flash node1

soc-nv-flash

Pin control

on-chip

WCH CH32V20x/30x AFIO1

wch,20x_30x-afio

Serial controller

on-chip

WCH CH32V00x UART1 3

wch,usart

SPI

on-chip

WCH SPI2

wch,spi

SRAM

on-chip

Generic on-chip SRAM1

mmio-sram

Timer

on-chip

WCH CH32V00x Systick1

wch,systick

Connections and IOs

LED

  • LED0 = Blue User LED

Button

  • SW0 = User Button

Programming and Debugging

Applications for the bluepillplus_ch32v203 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.

The following pins of the external programmer must be connected to the following pins on the PCB:

  • VCC = VCC

  • GND = GND

  • SWIO = PA13

  • SWCLK = PA14

Flashing

You can use minichlink 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 bluepillplus_ch32v203 samples/basic/blinky
west flash

Debugging

This board can be debugged via OpenOCD or minichlink.

References