Skip to the content
2 layers101.6 × 90.1 mmCh32x035f7p6 micro devboard panelized, the printed circuit board in 3D

Ch32x035f7p6 micro devboard panelized

esehehelp/ch32x035f7p6-micro-devboard1

micro devboard for ch32x035

Size
101.6 × 90.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
255
Nets
29
Pads
1,485
Tracks, vias
2,385, 855
Pours
15
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
7 Apr 2026
Updated
22 Sep 2026

Overview

Ch32x035f7p6 micro devboard panelized is an open-source printed circuit board by esehehelp, from the esehehelp/ch32x035f7p6-micro-devboard repository on GitHub, published under the MIT licence. It is a 2-layer board of 101.6 × 90.1 mm with 255 parts on 29 nets, routed with 2,385 tracks and 855 vias.

It is built around the CH32X035F7P6 and EVPAWCD40. Its parts include 90 resistors, 45 capacitors, 45 connectors, 30 ICs and 30 switches. It belongs with the microcontroller boards boards of this library.

Main components

2

README

README.md

CH32X035F7P6 Micro Devboard

CH32X035F7P6 (RISC-V, 48 MHz, 62 KB flash, 20 KB RAM) の小型開発ボード。

概要

USB CDC-ACM ライブラリ (ch32x-cdc) を中心に、PlatformIO と Arduino IDE の両方をサポート。 ESP32/RP2040 の Arduino Serial と同じ体験 — 初期化を呼ぶだけで USB シリアルが使え、1200bps タッチでファームウェア更新ができる。

Windows クイックセットアップ

Arduino IDE を閉じ、PowerShell で以下を実行する。Git やリポジトリの事前ダウンロードは不要。

powershell
curl.exe -fL https://raw.githubusercontent.com/esehehelp/ch32x035f7p6-micro-devboard/fix/usb-c-pd-cdc-stability/install.ps1 -o install.ps1
if ($LASTEXITCODE -ne 0) { throw 'Download failed' }
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\install.ps1

実行前にダウンロードした install.ps1 の内容を確認できる。インストーラはボードのソースを一時取得し、以下を自動で入れる。

  • Arduino スケッチブックへのボードコア
  • WCH RISC-V GCC ツールチェイン
  • 最新の wchisp と CH375DLL64.dll
  • WCH 署名済み USB ISP ドライバ(ここだけ UAC 確認あり)
  • PlatformIO 向けの Windows 用アップローダ(%LOCALAPPDATA%\CH32X035\tools)

完了後に Arduino IDE を起動し直し、CH32X035F7P6 Micro Devboard を選択する。以後は Zadig で WinUSB と WCH ドライバを入れ替える必要はない。

すでにリポジトリがある場合は setup.bat をダブルクリックしても同じ。スケッチブックが特殊な位置にある場合だけ次のように指定する。

powershell
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -Sketchbook D:\Arduino

PlatformIO (firmware/)

構成

text
firmware/
  platformio.ini          # PlatformIO 設定
  ch32_1k2touch.py        # カスタムアップロードスクリプト
  src/
    main.c                # サンプルアプリ (PC3 blink + CDC echo)
    startup.S             # ベクタテーブル + 起動コード
    link.ld               # リンカスクリプト
  lib/
    ch32x-cdc/
      include/
        ch32x_cdc.h       # 公開 API
        ch32x_regs.h      # MIT レジスタ定義 (WCH HAL 非依存)
      src/
        ch32x_cdc.c       # CDC 実装 (ディスクリプタ, ISR, バッファ)

ビルド & 書き込み

bash
cd firmware

# ビルド
pio run

# 書き込み (初回: wch-link 経由)
pio run -t upload --upload-port wlink

# 書き込み (2回目以降: USB CDC 1200bps タッチ経由, wch-link 不要)
pio run -t upload

初回書き込みは wch-link (SWD) が必要。一度ファームウェアが動けば、以降は USB ケーブルだけで pio run -t upload でフラッシュできる。

Windows では先に上記の curl セットアップ、または setup.bat を一度実行する。PlatformIO 同梱の古い wchisp ではなく、WCH 公式ドライバに対応した新しい版が自動的に使われる。

Arduino IDE (arduino/)

インストール

Windows では上記の curl セットアップだけで完了する。手動コピー、Python/ツールチェインの PATH 設定、Zadig は不要。

Arduino IDE では次の順に選ぶ。

  1. Tools > Board > CH32X035F7P6 Boards > CH32X035F7P6 Micro Devboard
  2. Tools > Port でボードの COM ポート
  3. File > Examples > CH32X035 Examples > 01_Blink
  4. Upload を押す

ボードがすでに BootROM に入って COM ポートが見えない場合も、そのまま Upload を押せば wchisp が検出する。

Examples

  • 01_Blink — オンボード LED (PC3)
  • 02_SerialHello — USB Serial へカウンタ出力
  • 03_SerialEcho — Serial Monitor の送受信
  • 04_DigitalInputPullup — D0/PA0 の内蔵プルアップ入力

ピンアサイン

基板シルクと同じ PA0, PB12, PC1 などの名前をスケッチで直接使える。Arduino 互換の D0 / A0 形式も同じピンを指す。

ArduinoMCU / silkMCU pinNotes
D0 / A0PA06ADC0
D1 / A1PA17ADC1
D2 / A2PA28ADC2, USART2 TX capable
D3 / A3PA39ADC3, USART2 RX capable
D4 / A4PA410ADC4, SPI SS capable
D5 / A5PA511ADC5, SPI SCK capable
D6 / A6PA612ADC6, SPI MISO capable
D7 / A7PA713ADC7, SPI MOSI capable
D8PB114ADC9 capable
D9PB121GPIO
D10PC15GPIO
D11PC34LED_BUILTIN、RESET ボタン/NRST と共有
D12PC1819SWDIO と共有
D13PC1920SWCLK と共有

USB 用の PC14 (CC1), PC15 (CC2), PC16 (D-), PC17 (D+) は Arduino デジタルピンに含めない。PC18/PC19 を GPIO にすると SWD デバッグと競合する。また現在の最小コアは analogRead() / SPI / HardwareSerial をまだ実装していないため、表の peripheral capable は MCU の配線能力を示す。

Arduino API サポート

  • Serial — USB CDC シリアル (USBSerial クラス、Print 継承)
  • millis() / micros() / delay() / delayMicroseconds() — SysTick ベース
  • pinMode() / digitalWrite() / digitalRead()

API

c
#include "ch32x_cdc.h"

// 初期化 (NULL でデフォルト設定)
ch32x_cdc_config_t cfg = { .magic_baud_enable = 1 };
ch32x_cdc_init(&cfg);

// 読み込み
int ch32x_cdc_available(void);       // 受信バイト数
int ch32x_cdc_read(void);            // 1バイト読み込み (-1 = 空)
size_t ch32x_cdc_read_buf(buf, max); // バッファに一括読み込み

// 書き込み
size_t ch32x_cdc_write(buf, len);    // バイト列送信
size_t ch32x_cdc_print(str);         // 文字列送信
void ch32x_cdc_flush(void);          // TX 完了待ち

// BootROM へリブート (手動呼び出し用)
void ch32x_cdc_reboot_to_bootrom(void);
設定
c
typedef struct {
    int      magic_baud_enable;  // 1200bps リブートトリガ (デフォルト: 有効)
    uint32_t magic_baud;         // トリガボーレート (デフォルト: 1200)
    void (*pre_reboot)(void);    // リブート前コールバック
} ch32x_cdc_config_t;
RX コールバック
c
// ISR コンテキストで呼ばれる (weak シンボル、アプリ側でオーバーライド可)
void ch32x_cdc_on_rx(const uint8_t *buf, size_t len) {
    // 受信データを処理
}

サンプルアプリ (PlatformIO)

firmware/src/main.c — PC3 LED 点滅 (500ms) + USB CDC エコー。

c
#include "ch32x_regs.h"
#include "ch32x_cdc.h"

int main(void) {
    ch32x_cdc_init(NULL);

    /* PC3 push-pull output (cdc_init already enabled GPIOC clock) */
    GPIOC->CFGLR = (GPIOC->CFGLR & ~(0xFu << 12)) | (0x3u << 12);

    for (;;) {
        uint8_t buf[64];
        size_t n = ch32x_cdc_read_buf(buf, sizeof(buf));
        if (n > 0)
            ch32x_cdc_write(buf, n);
        ch32x_cdc_poll();
        IWDG->CTLR = 0xAAAA;
    }
}

技術メモ

  • クロック設定: ch32x_cdc_init() 内で HSI 有効化、Flash 2 wait-state 設定、HPRE=DIV1 (HCLK=48MHz) を行う。BootROM が HPRE を div6 (8MHz) のまま残すため、明示的なクリアが必要。
  • SysTick: QingKe V4C の 64-bit カウンタ。HCLK/8 (6MHz) で動作。カウンタリセットは CTLR bit 4 で行う(CNTL/CNTH 直接書き込みは不可)。
  • レジスタ定義: ch32x_regs.h は TRM から自作した MIT ライセンスの定義。WCH HAL/EVT に依存しない。
  • 割り込み: USBFS_IRQHandler はライブラリが strong シンボルとして提供。startup.S の weak シンボルをリンカが解決。
  • ISR 属性: GCC 8.2 (Arduino/WCH ツールチェイン) では __attribute__((interrupt)) を使用。WCH-Interrupt-fast はカリーセーブドレジスタしか保存しないバグがある。GCC 12 (PlatformIO) では WCH-Interrupt-fast で問題なし。
  • BootROM 突入: FLASH->BOOT_MODEKEYR アンロック → FLASH->STATR |= BOOT_MODE → PFIC システムリセット。チップ内蔵 ISP (0x1FFF0000) が起動し、wchisp で書き込み可能。1200bps の line coding だけでは発火せず、DTR 解放まで完了した touch だけを受け付ける。
  • USB-C: PC14/PC15 に CC プルダウンを設定 (USBPD ペリフェラル経由)。ホストが VBUS を供給するために必要。
  • HardFault: サンプルアプリでは HardFault 時に BootROM へリブート。クラッシュしてもファームウェア書き直し可能。
  • IWDG: 旧ファームウェアが IWDG を起動していた場合、ソフトウェアリセットでは停止しない。メインループで IWDG->CTLR = 0xAAAA で給餌するか、電源を入れ直す。
  • C++ 初期化: startup.S で __libc_init_array() を呼び出し、vtable やグローバルコンストラクタを初期化。-nostartfiles 使用時は _init/_fini スタブも必要。

License

MIT

Parts

255
QtyValueFootprintReferences
455k1Resistor_SMD:R_0603_1608MetricR1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R2 +29
3010u/35VCapacitor_SMD:C_0603_1608MetricC1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C2 +14
3022Resistor_SMD:R_0603_1608MetricR3, R3, R3, R3, R3, R3, R3, R3, R3, R3, R3, R3, R3, R3, R3, R4 +14
30EVPAWCD40Download_Lib:SW_SPST_EVPAWSW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW2 +14
30Pinheader_P2.54_9PConnector_PinHeader_2.54mm:PinHeader_1x09_P2.54mm_VerticalJ2, J2, J2, J2, J2, J2, J2, J2, J2, J2, J2, J2, J2, J2, J2, J3 +14
150.1u/50VCapacitor_SMD:C_0603_1608MetricC3, C3, C3, C3, C3, C3, C3, C3, C3, C3, C3, C3, C3, C3, C3
151kResistor_SMD:R_0603_1608MetricR6, R6, R6, R6, R6, R6, R6, R6, R6, R6, R6, R6, R6, R6, R6
15CH32X035F7P6Package_SO:TSSOP-20_4.4x6.5mm_P0.65mmU1, U1, U1, U1, U1, U1, U1, U1, U1, U1, U1, U1, U1, U1, U1
15NJM78L33SU3Package_TO_SOT_SMD:SOT-89-3U2, U2, U2, U2, U2, U2, U2, U2, U2, U2, U2, U2, U2, U2, U2
15Red_LEDLED_SMD:LED_0603_1608MetricD1, D1, D1, D1, D1, D1, D1, D1, D1, D1, D1, D1, D1, D1, D1
15USB_C_ReceptacleDownload_Lib:USB-C_16-HandSolderJ1, J1, J1, J1, J1, J1, J1, J1, J1, J1, J1, J1, J1, J1, J1

More from esehehelp/ch32x035f7p6-micro-devboard

1

Similar boards

  • 2 layersKey, the printed circuit board in 3D

    Key

    kannakanna1/key

    key.kicadsch の 4 行 × 3 列スイッチを読み取り、USB HID Boot Keyboard として入力するファームウェアです。CDC シリアルも複合デバイスのまま残し、参照実装と同じ 1200 bps touch → BootROM 書き込みを使用します。スケッチは firmware/keypad/keypad.ino、ボードパッケージは hardware/key/ch32x035f7p6/ です。

    40 parts
  • 2 layers20.3 × 50.8 mmRp2354a micro devboard, the printed circuit board in 3D

    Rp2354a micro devboard

    esehehelp/rp2354a_micro_devboard

    rp2354a micro devboard

    65 partsMIT
  • 2 layers85.6 × 54 mmBusiness Card v2, the printed circuit board in 3D

    Business Card v2

    SattiDaBeaver/Business_Card_v2

    RISC-V supercluster PCB business card with 1 master + 8 worker MCUs over a shared UART bus, USB-C edge connector

    183 parts1
  • 2 layers95 × 30 mmTsubaki lite, the printed circuit board in 3D

    Tsubaki lite

    ametou/tsubaki_lite

    4key+knob ortholinear osu! keyboard w/ individual LED, powered by CH32X035. With reference to https://github.com/rgoulter/keyboard-labs

    39 partsCERN-OHL-W-2.0
  • 2 layers53 × 69 mmVu meter processor, the printed circuit board in 3D

    Vu meter processor

    radioegor146/vu-meter

    Physical VU meter for use with rack audio equipment

    54 parts
  • 2 layersT41-Main+RF board V012, the printed circuit board in 3D

    T41-Main+RF board V012

    DRWJSCHMIDT/T41

    This is the repository for the officially released V10, V11, and V12 versions of the T41 Software Defined Transceiver hardware and kits.

    255 parts66
  • 2 layers102 × 86 mmPoppyIO, the printed circuit board in 3D

    PoppyIO

    Rahix/Poppy-Logic-Controller

    A budget PLC-like board for controlling 24V DC equipment.

    255 parts24

Questions

How big is the Ch32x035f7p6 micro devboard panelized PCB?

It measures 101.6 × 90.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Ch32x035f7p6 micro devboard panelized use?

255 parts, built around the CH32X035F7P6 and EVPAWCD40. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Ch32x035f7p6 micro devboard panelized KiCad files?

From the esehehelp/ch32x035f7p6-micro-devboard repository on GitHub, at the commit this page was made from: the board is hardware/ch32x035f7p6_micro_devboard_panelized.kicad_pcb and its schematic hardware/ch32x035f7p6_micro_devboard.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Ch32x035f7p6 micro devboard panelized design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).