A real-world case where a CH32V307 ADC pin measured 3.7V due to 5V back-feeding from an RS485 transceiver. Covers root cause, diagnosis steps, and design guidelines for mixed-voltage MCU systems.
The Problem
A production CH32V307 board (in service for several years) suddenly showed incorrect ADC readings. The ADC0 input pin (PC1) measured 3.7V -- higher than the 3.3V supply rail, which should be physically impossible under normal operation.
Symptoms:
- CN4 connector pins 3 and 4 open: ADC0 reads 3.7V (expected: 3.3V)
- CN4 connector pins 3 and 4 shorted: ADC0 reads 0.4V (expected: 0V)
- All other 3.3V and 5V rails measure correctly
- Board has been in production for years with no issues
Diagnosis Steps
Step 1: Verify ADC Configuration
WCH technical support identified two potential configuration issues:
- ADC clock too fast: At 144MHz system clock with 8x divider, the ADC clock is 18MHz -- exceeding the 14MHz maximum specification. Solution: reduce system clock to 96MHz.
- ADC Buffer enabled unnecessarily: The ADC input buffer should be disabled unless specifically needed.
However, after applying these fixes, the 3.7V reading persisted -- confirming this was a hardware, not software, issue.
Step 2: Check for Current Back-Feeding
The key diagnostic step:
float the ADC0 pin (PC1) and measure the pin voltage directly.
If the floating pin still reads 3.7V, there is current injection from somewhere on the board. The most common source is a 5V-powered peripheral whose signal line back-feeds through the MCU's internal ESD protection diode.
Step 3: Isolate the Culprit
Methodically remove 5V-powered components one by one:
- Remove U44 (RS485 transceiver) -- this was the prime suspect
- Re-measure the ADC0 pin voltage
- If voltage drops to normal, the removed component is the source
Root Cause
The RS485 transceiver chip was powered from 5V. When configured in receive-enable mode, the RX signal output carries 5V logic levels. This 5V signal, connected directly to a CH32V307 GPIO pin (which shares the 3.3V domain), caused current to flow through the pin's internal ESD protection diode into the 3.3V rail.
This back-feeding elevated the pin voltage to approximately 3.7V (3.3V + one diode drop), which is exactly what the ADC measured.
Solution
Replace the RS485 transceiver with a 3.3V-powered variant. This completely resolved the ADC voltage anomaly.
Design Guidelines for CH32V307 Mixed-Voltage Systems
- Never connect 5V logic outputs directly to CH32V307 GPIO pins -- always use level shifters, voltage dividers, or opto-isolation
- Use 3.3V-powered peripherals whenever possible -- many modern RS485/RS232 transceivers support 3.3V operation (e.g., MAX3440 series, SP3485)
- Check ADC clock compliance -- maximum 14MHz; at 144MHz system clock, use at least 12x divider
- Disable ADC input buffer unless your application specifically requires it
- Add series resistors on signal lines from external devices (1k-10k) to limit back-feeding current even if a fault occurs
- Use ESD protection diodes rated for the expected voltage range, or add external Schottky clamping diodes to VDD
Applicable WCH MCU Models
This design guideline applies to all WCH RISC-V MCUs operating at 3.3V:
- CH32V003 ($0.1, RV32EC, 48MHz): 2V-5V supply, but GPIO should match peripheral voltage
- CH32V203 ($1, BLE 5.3): 2.5V/3.3V supply, commonly paired with USB peripherals
- CH32V307 ($3, gigabit Ethernet MAC): Often used in industrial networks with RS485
- CH32V317 ($4, 480Mbps USB): Commonly mixed with 5V USB peripherals
- CH32V407 (dual 480Mbps USB + vector extension): Advanced applications with mixed-voltage I/O
For new industrial designs, we recommend standardizing on 3.3V for all peripheral interfaces when using WCH MCUs. This eliminates an entire class of voltage compatibility bugs that can be extremely difficult to diagnose in production.
Source:
WCH Forum - CH32V307 ADC Voltage Issue
Source:
WCH Forum - CH32V407 RT-Thread Porting