# Comu: Tiny CH32V203 in your USB port

A bite-sized CH32V203 devboard that fits inside your USB-A port.

- **Seller:** [Icy Electronics](https://lectronz.com/stores/icy-electronics), Cannes, France
- **Price:** €4.99 (EUR, before shipping and taxes)
- **Availability:** Sold out
- **Categories:** Platform, Prototyping, USB
- **Country of origin:** France
- **Product page:** https://lectronz.com/products/comu

## Options

**Case**

- No case
- White case [Add €0.05]

## Links

- [Documentation](https://github.com/cheyao/comu)
- [Code](https://github.com/cheyao/comu/tree/main/examples)
- [Design Files](https://github.com/cheyao/comu/tree/main/hardware)
- [Schematics](https://kicanvas.org/?repo=https%3A%2F%2Fgithub.com%2Fcheyao%2Fcomu%2Ftree%2Fmain%2Fhardware)

## Images

![Comu: Tiny CH32V203 in your USB port](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NjcyODIsInB1ciI6ImJsb2JfaWQifX0=--c91c24c5635d83ab24fef9d1baa27c0b08f9cca3/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--970c165836a83091725a1a0fd4f37ce9408da1bf/dual-boards-coin-comparison.jpg)
![Comu: Tiny CH32V203 in your USB port](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NjcyODYsInB1ciI6ImJsb2JfaWQifX0=--adf2e7747aa12587091240306266acbe823f1840/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--970c165836a83091725a1a0fd4f37ce9408da1bf/signle-in-case.jpg)
![Comu: Tiny CH32V203 in your USB port](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NjcyOTQsInB1ciI6ImJsb2JfaWQifX0=--d1f48a34d41e5ec6eb9c84504735440218484ced/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--970c165836a83091725a1a0fd4f37ce9408da1bf/single-coin-comparison.jpg)
![Comu: Tiny CH32V203 in your USB port](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NjcyOTgsInB1ciI6ImJsb2JfaWQifX0=--5207aa0dc20225b48a3e111f6bda73895c458c37/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--970c165836a83091725a1a0fd4f37ce9408da1bf/single-top.jpg)
![Comu: Tiny CH32V203 in your USB port](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NjcyOTAsInB1ciI6ImJsb2JfaWQifX0=--df3fb33bf70c13146ad2e590c077a770759fb164/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--970c165836a83091725a1a0fd4f37ce9408da1bf/single-bottom.jpg)
![Comu: Tiny CH32V203 in your USB port](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6Njc0OTEsInB1ciI6ImJsb2JfaWQifX0=--3276c01a5cf55e00d69df9cee9b8dd5d2b033602/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--970c165836a83091725a1a0fd4f37ce9408da1bf/laptop-inserted.jpg)

## Description

Comu is a tiny CH32V203 RISC-V computer that fits inside a USB port. It is user programmable, fitted with a custom bootloader, has four captive touch buttons and two LEDs. The board is supported by [ch32fun](https://github.com/cnlohr/ch32fun), allowing easy and lightweight RISC-V bare-metal development.

The CH32V203 is equipped with 252KB of Flash and 20KB of SRAM, more than enough for most embedded applications. The chip also has a wide array of peripherals, including DMA and a 12bit ADC, allowing for a wide variety of uses. The board also exposes 6 GPIO pins via testpoints, allowing it to be embedded on custom boards for further use.

It can also easily act as a **USB HID device**, allowing portable key injections to avoid repetitive typing. With it 4 captive buttons, you can make it into a sliding volume adjuster, computer sleep trigger, screen capture device and more!

![](https://rawcdn.githack.com/cheyao/comu/9ec367815ad6599a48e7f3e2cd892590ccf64adc/images/pcb-on-hand.jpg)

### No bloat, no weight

Using bare-metal programming in C/C++, the RISC-V program created for this chip contains 0 bloat. The minimal size of a blinky is only **40 bytes**, compared to 324KB on Arduino Pico or 12KB with Pico SDK. The [CH32V203 RM](https://www.wch-ic.com/downloads/CH32FV2x_V3xRM_PDF.html) contains all information needed to use the MCU, from register descriptions to memory layout.

The board is also very lightweight, weighing merely 0.4g (0.2g without case). Measuring a mere 13x9.4mm, it occupies nearly no space.

Even in such constrained space, the board still boasts rich peripherals. You can directly access 2 white LEDs and 4 captive buttons. The captive buttons are double-sided edge-plated, ensuring accurate touch sensing. It is also easy to use thanks to the CH32V203's touchkey peripheral, directly handling all the troublesome parts of touch sensing. (Example in `examples/touch` folder).

### USB explorer

The CH32V203 is perfect for USB packet exploring. Its bare and well-documented USBD peripheral allows you to manipulate raw packets, while taking care of troublesome parts such as transaction handling. You can directly pair this with [usbmon](https://docs.kernel.org/usb/usbmon.html) on Wireshark to explore how USB transactions work.

![](https://rawcdn.githack.com/cheyao/comu/9ec367815ad6599a48e7f3e2cd892590ccf64adc/images/dual-boards-coin-comparison.jpg)

### Custom bootloader

The board comes pre-programmed with a sleek custom USB bootloader to compensate for the lack of a BOOT0 button and the large size of the official bootloader. The custom bootloader is only **2KiB** in size, freeing up the 28KiB of boot flash for user use.

The bootloader is also completely open source; check out its source code in the [bootloader](https://github.com/cheyao/comu/tree/main/bootloader) folder. The only quirk is that the programs must be linked and flashed to `0x800`, but that is taken care by the provided Makefile and minichlink in the examples folder.

### Bare metal isn't your thing?

No worries! The CH32V203 is also supported by a wide array of tools: Rust via [ch32-hal](https://github.com/ch32-rs/ch32-hal), Arduino via [arduino_core_ch32](https://github.com/openwch/arduino_core_ch32), or normal WCH-HAL via [Mounriver Studio II](https://mounriver.com/download).

USB communication can be completely handled by libraries such as [tinyusb](https://docs.tinyusb.org/en/latest/index.html) or [ch32fun's usbd lib](https://github.com/cnlohr/ch32fun/blob/master/extralibs/usbd.c). All raw peripherals can also be hidden by Mounriver's HAL.

### Tons of examples

There are tons of examples in the [examples](https://github.com/cheyao/comu/tree/main/examples) folder on this repo, and also compatible with the examples in [ch32fun](https://github.com/cnlohr/ch32fun).

![](https://rawcdn.githack.com/cheyao/comu/9ec367815ad6599a48e7f3e2cd892590ccf64adc/images/comu.png)

### Features

- [CH32V203](https://wch-ic.com/products/CH32V203.html) 32bit RISC-V MCU
    - 224KB Flash, 24KB Boot Flash, 20KB SRAM (64KB 0-wait Flash and 160KB Normal Flash)
    - 144MHz with internal oscillator
    - 12bit ADC
    - 49.3 μA/MHz @ run and 19.4 μA/MHz @ sleep
    - USB full speed peripheral
- 4x Captive touch buttons w/ castellated edges
- 2x LEDs
- 6x GPIOs broken out via testpads
- Fits in a USB-A connector

*Made in France btw*

## Shipping policy

The items will be sent form France, so there will be no customs for EU countries. For other countries there might be customs, but in my experience there shouldn't by any with French Post. (Still depends on your country)

Even so I am not responsible for any customs charged by your government, but I'll fill out the required forums :)

Feel free to send me a message if you would like other shipping methods.
(Mondial relay etc should cost ~5 eur within Europe, but price is different for each country)
