Introduction
In the world of embedded systems, we are constantly balancing three variables: Performance, Power, and Price. Usually, you can pick two. But every now and then, a chip comes along that promises to disrupt the equation.
Enter the WCH572.
This little RISC-V microcontroller from WCH (WinChipHead) has been making waves for one reason: it is absurdly cheap. We are talking about a BLE 5.0 capable chip that costs less than a cup of coffee—heck, less than a sip of coffee. For high-volume products, this price point is a dream come true.
But as I found out while porting our BLE stack to this chip, “cheap” comes with a hidden cost.
The Good: “It Costs HOW Much?”
Let’s start with the positives, because on paper, the specs are incredible for the price.
- RISC-V Core: It packs a QingKe 32-bit RISC-V3C core running up to 60MHz. No licensing fees means lower cost for us.
- BLE 5.0: It supports Bluetooth Low Energy 5.0 with a decent -95dBm receive sensitivity and programmable transmission power up to +7.5dBm. Getting a modern BLE stack on a sub-dollar chip is impressive.
- Power Consumption: The power numbers are respectable for battery-powered IoT:
- Idle mode: ~1.7mA
- Shutdown: ~0.3uA (with wake-up capabilities)
- USB Capabilities: Surprisingly, it includes a full-speed USB 2.0 Host/Device controller. This is rare for basic BLE chips and opens up interesting dongle applications.
- Tiny Footprint: The QFN20 package is tiny (3x3mm), perfect for space-constrained wearables.
If you are building a simple beacon, a basic remote, or a USB-to-BLE dongle, this chip is a no-brainer.
The Bad: The “Quirks” & The “ADC”
Every budget chip has its quirks, and the WCH572 is no exception.
The “ADC” Disappointment
If you’re planning to read sensors, stop right there. Unlike its big brother, the CH573 (which boasts a proper 12-bit ADC), the CH572 only has an Analog Comparator (CMP) with a 16-speed reference voltage. The datasheet euphemistically calls this “equivalent to a 4-bit ADC”. In practice, this isn’t a true ADC but a comparator that compares your input against 16 internal voltage levels. This means coarse voltage steps and significant software overhead if you want anything resembling a measurement. For precision sensing, you will need an external ADC or a different chip.
Toolchain & Documentation
- Documentation: While improving, the English documentation (like the datasheet linked below) can be cryptic. You often find yourself cross-referencing Chinese datasheets or digging through SDK examples to understand how a peripheral actually works.
- Toolchain: MounRiver Studio is decent, but it’s not the polished experience of Keil or IAR. Programming quirks with
minichlinkare common.
The Ugly: The 12KB RAM Reality
And now, we get to the deal-breaker for many complex applications. The RAM.
The WCH572 comes with 240KB of CodeFlash (which is generous!) but only 12KB of SRAM.
Let that sink in. 12KB. For everything.
In an era where we casually throw around megabytes, 12KB feels like a typo. But it’s not. The CH573 offers 18KB, which is slightly more breathing room, but on the CH572, you are suffocating.
The Memory Map of Doom
I recently implemented a custom BLE profile for our project, including the Battery Service and Device Information Service. Here is what the memory usage looks like:
Memory region Used Size Region Size %age Used
FLASH: 89196 B 240 KB 36.29%
RAM: 9860 B 12 KB 80.24% 80.24% of the RAM is gone before I’ve even written the main application logic.
Visualizing the squeeze: 12KB doesn’t go far when BLE is involved.
Let’s break down where that RAM is going:
- BLE Stack: The BLE stack itself reserves a huge chunk of memory for connection states, buffers, and advertising data. In
ble_user.h, we have to be extremely careful with our configuration:#define BLE_MEMHEAP_SIZE (4096) // 4KB just for the heap! #define BLE_BUFF_NUM 5 // Limited to 5 buffers #define BLE_BUFF_MAX_LEN 247 // Max packet size - Global Variables: Every static variable, every buffer, every flag eats into that remaining 20%.
- Stack & Heap: You need space for the call stack and dynamic allocation. With only ~2KB left, one deep recursion or a large stack array means HardFault.
The “Optimization” Game
Working with the WCH572 isn’t just programming; it’s extreme optimization.
- Const Everything: Move every possible lookup table, configuration struct, and large string to Flash using
const. Every byte saved in SRAM is gold. - Reuse Buffers: You can’t afford separate buffers for UART, USB, and BLE. Implement a shared “scratchpad” buffer system or reuse the BLE buffers when the radio is idle.
- Limit BLE Features: Do you really need 5 simultaneous connections? No? Drop it to 1. Do you need the full MTU size? Shrink it.
Tips from the Trenches
Deep in the Chinese developer forums, I found a few nuggets of wisdom that saved my project:
- Crystal Accuracy is King: Random BLE disconnections (error 0x08)? Check your 32kHz crystal. The BLE timing is extremely sensitive, and a cheap, inaccurate crystal will cause the stack to drift and lose connection.
- The “Watchdog” Debugger: Since you don’t always have a JTAG attached in the field, use the Watchdog interrupt to capture the Program Counter (PC) right before a reset. Printing this value on the next boot can tell you exactly where your code hung.
- USB Bootloader: To enter the USB download mode without a programmer, you often need to short specific pins (usually PB22/Boot to GND) during power-up. If you brick the chip with bad firmware, this is your escape hatch.
Conclusion
The WCH572 is a marvel of engineering economics. It brings 32-bit RISC-V performance and BLE 5.0 to a price point that was previously impossible.
Is it a good chip? Yes, for the right application (Simple beacons, USB dongles, basic control). Is it easy to use? No. The RAM constraint makes it an “Expert Mode” chip.
If your application is simple, it’s fantastic. But if you need complex logic, large data buffers, or multiple concurrent BLE connections, that 12KB RAM limit will haunt your dreams. Spend the extra pennies for the CH573 or a different family entirely.
Resources
- Datasheet: Download CH572/CH570 Datasheet (PDF) - The ground truth for specs.
- Manufacturer: WCH Official Website
Have you worked with the WCH572? How do you manage the 12KB limit? Share your war stories in the comments!

Comments are powered by GitHub Discussions.