How to Minimal-Boot and Flash CH32V203C8T6 on an Adapter Board

I received a large batch of CH32V203C8T6 microcontrollers.

And a question arose: how do I check if these microcontrollers are good? There are no ready-made device boards available at the moment, but they still need to be tested somehow. Fortunately, I have a few LQFP48 to PGA adapter boards.


I haven’t had to solder such complex chips before. I’ll try using a mini-oven for the soldering process.

Additionally, I’ll need solder paste. I have a tube that has been sitting around for quite a while. I once tried it on some small parts and put it aside, thinking that one day I’d be soldering serious stuff and this paste would come in handy.

Several years have passed, and that moment has come. But as it turns out, solder paste can dry up, especially if the tube isn’t sealed tightly :) It used to be almost liquid, but now it feels like playdough.

I managed to squeeze some out and smear it across the adapter. This is my first time soldering packages like this, let alone using bottom heating - I’ve only seen how it’s done on YouTube. So, I have neither the feel for the proportions nor the skills yet.


Next, immediately place the CH32V203 microcontroller so that its pin 1 marker (the unique dimple under the marking) aligns perfectly with pin 1 on the adapter.

The AI suggests that first, this “sandwich” needs to be preheated to 300°F(150°C) and held there for 80-90 seconds. This should activate the flux in the paste. After that, everything needs to be heated up to 430°F(220°C) and kept at that temperature for about 10 seconds.

And, of course, the first attempt didn’t go without a hitch — I used way too much paste, and the pins are shorted out by excess solder on all sides.

I grab some solder wick, generously coat everything with flux, and clean off the excess solder from each side.

As a result, we get clean pins without any shorts.

 
Now, I’ll prepare the microcontroller for its first launch. Let’s take a look at the datasheet:

It doesn’t take much to run it with a minimal setup: just a few capacitors and a single resistor. We don’t even need an external crystal oscillator - the microcontroller will run perfectly fine using its internal oscillator. Just a few steps are enough:

  • Apply power: Connect 3.3V to pins 48, 36, 24, and 9, and connect pins 47, 35, 23, and 8 to ground (GND).

  • Configure BOOT0: Pull the BOOT0 pin (44) down to ground through a 10 kΩ resistor. This disables the UART programming mode.

  • Break out the flashing and debugging interfaces: Solder a PLS pin header for the power lines, programming lines (SWCLK (37) and SWDIO (34)), and the PA9 / USART TX pin (30) so we can see a “Hello World” from the microcontroller.

  • Install decoupling capacitors: According to the rules, there should be a separate 100 nF capacitor next to each pair of power pins. However, I simplified the circuit a bit and soldered only two capacitors across pairs 48–47 and 23–24 — they fit absolutely perfectly right there on the adapter itself.

I’m jumping the four power points with wire jumpers. It doesn’t look as clean anymore with all these wires, but it should do the trick.

Next, I decided to check everything for any accidental shorts. And that’s where a problem pops up: the resistance between VDD and GND is only 1.6 ohms. I double-check all the solder joints — no accidental bridges anywhere.

Alright, I desolder my whole daisy chain of wires — the problem persists. I start thinking that maybe one of the capacitors is blown. I desolder both of them — and nothing, pins 34 and 35 are still shorted.

At this point, I’m thinking the MCU is toast — maybe I overheated it or something. I pull the adapter board out of the breadboard to get a closer look, and then it hits me. When I was soldering the PLS pin headers, I plugged everything into the breadboard to hold it in place. But the tie-points in the vertical rows are connected internally! That was exactly why I kept seeing a short circuit during my measurements.

So, I solder everything back in: the capacitors, the wires, and the resistor.

I connect the power, SWD lines, and UART RX to the programmer. First check: let’s try to read the chip ID using the programmer. Under Linux, I use minichlink from the ch32fun project.

$ ./minichlink -i
minichlink version - 37d4fcfc0646861cdea273a931cfbd6136a405c5
Found WCH Link
WCH Programmer is LinkE version 2.11
Detected CH32V203
Flash Storage: 64 kB
Part UUID: e2-4a-ab-cd-4b-c2-bd-ab
Part Type: 20-31-05-00
Read protection: disabled
Interface Setup
USER/RDPR  : c03f/5aa5
DATA1/DATA0: ff00/ff00
WRPR1/WRPR0: 00ff/00ff
WRPR3/WRPR2: 00ff/00ff
R32_ESIG_UNIID1: e24aabcd
R32_ESIG_UNIID2: 4bc2bdab
R32_ESIG_UNIID3: e339e339

Awesome! The chip was successfully read. The next step is flashing a “Hello World” test firmware. For programming, I am using VS Code + PlatformIO. Here is the code for the test firmware, which will send data over UART and toggle the PA5 pin:

#include <ch32v20x.h>
#include <debug.h>

#define BLINKY_GPIO_PORT GPIOA
#define BLINKY_GPIO_PIN GPIO_Pin_5
#define BLINKY_CLOCK_ENABLE RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE)

void NMI_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
void HardFault_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));

int main(void) {
    SystemCoreClockUpdate();
    Delay_Init();
    USART_Printf_Init(9600);

    GPIO_InitTypeDef GPIO_InitStructure = {0};
    BLINKY_CLOCK_ENABLE;
    GPIO_InitStructure.GPIO_Pin = BLINKY_GPIO_PIN;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
    GPIO_Init(BLINKY_GPIO_PORT, &GPIO_InitStructure);

    uint8_t ledState = 0;
    while (1) {
        GPIO_WriteBit(BLINKY_GPIO_PORT, BLINKY_GPIO_PIN, ledState);
        ledState ^= 1;
        printf("Hello World\r\n");
        Delay_Ms(1000);
    }
    return 0;
}

void NMI_Handler(void) {}
void HardFault_Handler(void)
{
    while (1)
    {
    }
}

I flash the firmware, fire up the serial monitor, and there it is — the expected “Hello World” message:

The chip is alive and kicking!

Soldering high-pin-count packages like the LQFP48 at home might seem daunting at first, but in practice, it turned out to be completely doable. Even if you, like me, are working with old, dried-up solder paste and zero experience with bottom heating — a good flux and some solder wick will always save the day.

Comments

Popular posts from this blog

YD-RP2040 Module

Orange Pi Zero 3 - exploring GPIO

Modifying the INA226: From 0.8A to High-Power Current Sensing