Skip to the content.

Architecture

rp417 is a test fixture on a board: an RP2354B (always powered) controls a CH32H417MEU6 (QFN88), the device under test. A host PC talks to both over USB, so a script can power, reset, flash, stimulate and measure the CH32 without anyone touching the board. Guiding constraint (D22): as simple as possible, minimal BOM — firmware and on-chip resources first, extra ICs only where they earn their place.

            USB-C J3                         USB-C J1 (USB3 SS + USB2 HS)   USB-C J2 (USB FS / ISP)
               │                                   │        │                      │
        ┌──────┴──────┐  UART · I2C · QSPI    ┌────┴────────┴──────┐               │
        │   RP2354B   │  8-line logic bus     │                    ├───────────────┘
        │ supervisor  ├──────────────────────►│   CH32H417MEU6     │
        │ (always on) │  HSYNC · VSYNC · MARK │   (DUT, switched   │── microSD J4 (SDIO)
        │             │                       │    power domain)   │
        │  PIO count ─┼──► 2:1 switch ──DVP──►│                    │
        │             │        ▲              │  PB8/PB9 (HS + SDI)│
        │  SWIO/SWCLK ┼── TS3USB221A ◄────────┤                    │
        │  NRST, PWR  ┼──────────────────────►│                    │
        │  Si5351A ───┼─ CLK0 ─► ADC10065 ────┘ (D0–D9 into the 2:1 switch)
        │             ├─ CLK1 ─► PCLK
        │             └─ CLK2 ─► LC filter ─► GEN ─► J5 ─► ADC10065 / CH32 ADC + HSADC (PC0)
        └─────────────┘

The full mermaid block diagrams from the design phase are on the design page.

All RP↔CH32 lines have a series resistor — 33 Ω on QSPI, the logic bus and the sync lines, 220 Ω on the UART, 100 Ω on I2C, 22 Ω on the capture data, 1 kΩ on NRST — to limit clamp current if the RP drives a line while the CH32 domain is off (D29). Full list: pin map.

Link Pins Notes
UART RP GPIO0/1 ↔ CH32 PA9/PA10 (USART1) also the CH32’s UART ISP pins on QFN88
I2C RP GPIO2/3 ↔ CH32 PB10/PB11 pull-ups on the CH32 rail (D29)
QSPI RP GPIO6–11 ↔ CH32 PE10–PE15 CH32 QSPI is master-only (RM V1.8 ch. 37) → RP PIO slave (D38)
Logic bus RP GPIO12–19 ↔ CH32 PD10–PD15, PC6, PC7 8 general-purpose lines (D03, D56)
Capture control RP GPIO31/32 → HSYNC PA4 / VSYNC PA5; GPIO33 → shot marker PB14 (TIM9_CH1); GPIO34 ← CH32 MCO D37, D56
Programming RP GPIO35/36 → SWIO/SWCLK (via U4); GPIO37 → NRST; GPIO38 → CH32 power enable D11, D26

Programming the CH32

Capture path

Clocks and test signal

User I/O

Standalone mode

The RP2354B is always on the board and always powered. “Standalone” means no host on the RP’s USB: its firmware boots into safe defaults (CH32 powered, NRST released, USB switch → connector, generator off), and the CH32 can command the RP over UART/I2C (generator frequency, sample clock, rail measurements) so CH32-only tests keep their stimulus (D15, R10).

Not on rev A

UHSIF capture (parked, D21), an external power input (D41), current monitoring ICs (D28: the RP’s ADC watches the CH32 rail and VSYS instead), an on-board WCH-LinkE (D10), a CH32 debug header (dropped 2026-11-14).