CH32X035: WCH's All-in-One USB + Type-C PD RISC-V MCU
WCH's CH32X035 drops the external PD trigger chip. Built on the QingKe V4C RV32IMAC core, it integrates USB 2.0 full-speed, USB PD and Type-C PHYs, plus a programmable I/O controller, dual OPA, triple CMP, 12-bit ADC and 65 KB Flash — all in one 2-to-5.5 V industrial-grade package as small as QFN12.
Overview
The CH32X035 is WCH's USB + Type-C PD microcontroller built around the 48 MHz QingKe V4C RISC-V core (RV32IMAC). Unlike the older CH32V003 (a tiny 48 MHz RV32EC part with no USB), the X035 is a different species: the protocol stack, the BMC physical layer and the Type-C termination are all built into the silicon, so you can negotiate 5 V / 9 V / 12 V / 15 V / 20 V PDOs without an external IP2721 or CH224K trigger chip.
The integrated USB 2.0 full-speed controller/PHY runs as both Host and Device, the I/O counts go up (24 external interrupts, four USARTs, two 16-bit advanced timers + general-purpose/watchdog/SysTick timers, an 8-channel DMA), and the analog side gains a second OPA and third comparator plus a 12-bit ADC — the typical mix for a programmable buck/boost source or a Sink that needs current/voltage monitoring.
Key Specifications
| Core | QingKe V4C, RV32IMAC, single-cycle hardware mul + hardware div |
| Max Frequency | 48 MHz |
| Flash / SRAM | 65 KB Flash / 20 KB SRAM |
| Supply Voltage | 2.0 – 5.5 V (wide-voltage, 3.3 V / 5 V ready) |
| USB | USB 2.0 full-speed Host + Device controller & PHY |
| USB PD | USB PD 3.0 controller + Type-C BMC PHY (built-in, no external trigger IC) |
| Debug | 2-wire SDI (serial debug interface) |
| Unique ID | 96-bit factory-programmed chip ID |
| Low-Power Modes | Sleep / Stop / Standby |
| Reset | Power-on reset, brownout reset (BOR/LVD/LVR/LVI), programmable voltage monitor |
| Package Options | LQFP64M, LQFP48, QFN28, QSOP28, QFN20, TSSOP20, QFN12 |
Peripherals at a Glance
| Programmable I/O | PIOC (WCH's PIO-style programmable protocol I/O controller) |
| DMA | 8-channel general-purpose DMA |
| Analog | 2× OPA/PGA, 3× voltage comparator (CMP), 12-bit ADC (multi-channel) |
| Touch | 14-channel TouchKey |
| Timers | 2× 16-bit advanced, 1× 16-bit general, 2× watchdog (IWDG/WWDG), 1× SysTick |
| Communication | 4× USART (LIN, ISO7816), 1× I2C (SMBus / PMBus), 1× SPI |
| GPIO | Fast GPIO with 24 external interrupts, 5 V-tolerant |
Why Built-In PD Matters
The classical "MCU + external trigger IC" topology — an MCU plus an IP2721, CH224K, HUSB238 or FUSB302 — works but adds:
- An extra BOM line and one more component to source on long-lead roadmaps.
- A small I²C / GPIO link between the MCU and the trigger, where timing bugs cause the entire PD contract to collapse.
- Hard-coded PDOs: change the charger or the PDO combination, and the trigger's strap pins often need reconfiguration.
The CH32X035 moves PD to the metal: the BMC encoding/decoding on CC1/CC2, the message CRC, the Source-Capabilities / Request / Accept / PS_RDY state machine and the Type-C attach/detach detection all live in the silicon. Your firmware only deals with policy ("what voltage did the partner offer, what do I want, what role am I").
Walking Through the Official Sink Example
WCH ships an EVT/EXAM/USBPD directory inside the CH32X035EVT.ZIP evaluation bundle. The Sink example (USBPD_SNK) is the smallest useful end-to-end demo. The high-level flow is:
// 1. Initialise USB PD stack (BMC PHY, protocol timers, Source-Cap detection)
USBPD_Init();
// 2. Wait for a Source to publish its capabilities
while (USBPD_GetRxStatus() == RX_EMPTY) { __WFI(); }
// 3. Parse the partner's Source_Capabilities PDO array
PDO_Source_Capabilities_t srcCap;
USBPD_GetMessage(USBPD_MSG_SRC_CAP, &srcCap);
// 4. Pick a 20 V (100 W) PDO and request it
uint8_t objPos = 3; // index of the 20 V PDO
RDO_Request_DataObject rdo = {
.objectPosition = objPos,
.giveBackFlag = 0,
.capabilityMismatch = 0,
.usbCommunicationCapable = 0,
.noUsbSuspendFlag = 1,
.operatingCurrent = 3000 / 10, // 3.0 A in 10 mA units
.maxOperatingCurrent = 5000 / 10
};
USBPD_SendRequest(USBPD_MSG_REQUEST, &rdo);
// 5. Wait for Accept, then PS_RDY, then enable your downstream rail
if (USBPD_WaitForMsg(USBPD_MSG_ACCEPT) &&
USBPD_WaitForMsg(USBPD_MSG_PS_RDY)) {
GPIO_SetBits(GPIOA, GPIO_Pin_0); // turn on downstream regulator EN
}
The board-side hardware hook-up only needs:
- CC1, CC2 → the partner's CC pull-ups/down (5.1 kΩ on Source side, Rd on Sink).
- VBUS to your downstream buck/boost controller.
- GPIO used in firmware as the regulator EN.
PIOC — the PIO-Style State Machine
The X035 introduces the PIOC (Programmable I/O Controller), WCH's RP2040-PIO-style peripheral that runs a small microprogram on dedicated logic to bit-bang or protocol-manipulate pins independently of the CPU. That means you can keep CC BMC, UART, SPI, I²C, even custom LED/IR protocols pumping at deterministic timing while the main core does application work — useful when you are also monitoring OPA outputs or driving PDOs.
Analog Toolkit for Programmable Power
The 2× OPA/PGA + 3× CMP + 12-bit ADC are purpose-built for the typical monitoring loop a programmable source needs:
- OPA #1 — current-sense amplifier on the high-side shunt.
- OPA #2 — VBUS voltage follower for the ADC.
- CMP — over-voltage / over-current window detector that can wake the MCU or shut the FET driver.
- 12-bit ADC with multi-channel scan — measure VBUS, IBUS, temperature, optocoupler feedback.
What the Official EVT Pack Includes
- USBPD_SNK — full Sink role example (covered above).
- USBPD_SRC — Source-role example for desktop-style power banks or fixed adapters.
- USBPD_DRP — dual-role port with Try.SRC / Try.SNK state toggling.
- USBPD_DisplayPort-AltMode — alt-mode negotiation reference.
All projects target MounRiver Studio (MRS), WCH's Eclipse-based IDE with the GCC RISC-V toolchain pre-bundled.
When to Pick the CH32X035
Compared with the older CH32V003, the X035 trades the ultra-low-cost RV32EC core for a fully-equipped RV32IMAC part with hardware mul/div, four USARTs, 65 KB Flash, and a full USB-PD + Type-C stack on-die. Where it fits best:
- USB-PD trigger replacement for chargers, power banks, e-cigarettes, tools.
- Programmable DC sources, lab power supplies, USB-PD decoy boards.
- Industrial sinks (5 V / 12 V / 20 V) where you want to drop the external trigger chip and reclaim PCB area.
- Battery-powered Type-C devices that need a DRP role, alt-mode support, and low-power standby.