CH32V002J4M6 is the 8-pin version of the CH32V002 – a 48 MHz RISC-V with 4 kB of RAM in a SOP8 package. It is pin-compatible with the CH32V003J4M6.
Here too, several GPIO share some pins (PD6/PA1 and PD4/PD5/PD1), so it matters which pin your program uses.
Specifications
- RISC-V (QingKe) at 48 MHz
- 16 kB flash, 4 kB SRAM
- 6 I/O pins with shared GPIO
- USART, I2C, ADC, PWM (no SPI in this package)
- 3.3 V or 5 V supply
- single-wire programming (SWIO)
- SOP8 package
It is programmed with the WCH-LinkE. Thanks to peripheral remapping, you can fit UART, I2C or PWM even on eight pins.
Pinout and pin table
Hover over a pin in the diagram or a table row; use the filter to highlight a bus. You can download the pinout as PNG or SVG.
| Pin | Name | Direction | UART | I2C | PWM | ADC | Remap | Note |
|---|---|---|---|---|---|---|---|---|
| 1 | PD6/PA1 | input/output | RX | T1CH2 | A6/A1 | PD6 – 1: TX; 3: T2CH3 | PA1 – 1: T1CH2; 5: T2CH2; 6: T2CH2; 8: RX; 9: T1CH2 | Shared pin – PD6 and PA1 (OSCI crystal); use only one of them; PD6: A6, RX; PA1: A1, T1CH2, OSCI | |
| 2 | VSS | – | ||||||
| 3 | PA2 | input/output | T1CH2N | A0 | 1: ADC trigger (ADC_IETR), T1CH2N; 4: T1CH2N; 5: T1CH2N, T2CH3; 6: T1CH2N, T2CH3; 7: T2CH3; 9: T1CH3 | Krystal (OSCO) | ||
| 4 | VDD | input | Power 3.3 V or 5 V | |||||
| 5 | PC1 | input/output | SDA | 1: T2CH1ETR; 2: T1BKIN, T2CH4; 3: T1BKIN, T2CH1ETR, RX; 4: T2CH2; 7: T1CH2N; 9: T1CH2N | ||||
| 6 | PC2 | input/output | SCL | 1: ADC trigger (ADC_RETR), T1BKIN; 2: T2CH2, RTS; 3: T1ETR; 7: T1CH3N; 9: T1CH3N | USART RTS; T1BKIN | |||
| 7 | PC4 | input/output | T1CH4 | A2 | 1: T1CH4; 2: T1CH2N; 3: T1CH1; 7: T1CH1; 8: T1CH1; 9: RX | clock output (MCO) | ||
| 8 | PD4/PD5/PD1 | input/output | TX | T2CH1ETR/T1CH3N | A7/A5 | PD4 – 1: T1ETR; 3: T1CH4; 4: T1ETR; 5: T1ETR; 6: T1ETR; 7: T2CH2; 9: RTS | PD5 – 1: RX; 3: T2CH4; 9: CTS | PD1 – 1: SCL, T1CH3N; 2: T1CH3N, RX; 4: SDA, T1CH4, TX; 5: T1CH4, RX | Shared pin – PD4, PD5 and PD1 (SWIO – programming); use only one of them; PD4: A7, T2CH1ETR; PD5: A5, TX; PD1: T1CH3N, SWIO, ADC trigger (ADC_IETR) |
What to watch out for
- Pin 8 connects PD4, PD5 and PD1 (SWIO) – use only one of them and leave the others as inputs.
- Pin 1 connects PD6 and PA1 (crystal OSCI).
- If your program switches SWIO to an output, uploading fails – account for this in your code.
- Logic levels follow the supply voltage (3.3 V or 5 V).
CH32V articles on chiptron.eu/
These chiptron.eu/ articles cover the CH32V chips:
- CH32V003 in the Arduino IDE and on Linux – WCH-LinkE programmer, openOCD and the CH32fun alternative
More pinouts
See all pinouts on the Pinouts page.