Bit Pirate CH32V003 programmer support

I’ve added support for programming CH32V003 and other CH32V devices to the Bit Pirate firmware.

This implements a USB adapter for the CH32V003 single wire debug (SWIO) protocol and exposes it via the arduino-ch32v003-swio serial protocol which can then be programmed via minichlink. I plan to use this as a test harness for my Zephyr work, as a single ESP32-S3 can program the DUT and then verify things like the correct PWM signal is generated or the right transaction happens over SPI.

The timing requirements of the I2C-like protocol are quite tight, so the change uses the ESP32’s RMT (Remote Control) peripheral to generate and read the signal. I tried bit-banging but the timing was too variable and tried SPI but the ESP32 always idles MOSI low.

Avatar
Michael Hope
Software Engineer