The pen is for small batch and non-continues production, programming of mcu's on custom pcb's. Making a custom-pcb-jig for flashing might be faster, but i like this since it's not pcb specific, and i tend to have between 10-500 pcb batches to flash.
The clothpin comes in handy for debugging, leaving the mcu connected to the flashtool wihout soldering.
| pin | stm32/ch32 | ch32v00x | stm8 |
|---|---|---|---|
| 1 | 3.3v | 3.3v | 3.3v |
| 2 | SW -clock | nc/reset | reset |
| 3 | gnd | gnd | gnd |
| 4 | SW-data | SDIO | SWIO |
Depending on the vcc of the board / the mcu, putting a diode between 3.3v and vcc is reconmended. I do this on the target pcb.
The reason i prefer this pinout in my pcbs is it doesn't kill anything if its accidentaly flipped around. Note that on most prefab development boards the pinout is useually somthing else like vcc-swd-swclk-gnd....
Pictured is 'E2' type. Have never tried anything else. Pitch is 1/10 inch.
- printed parts
- heat shrink Ø-12
- cable
- piece of perf-board
- glue (cyanoacrylate)
- pogopins
- flash tool connector
- optional cable sleeve
- printed parts
- heat shrink Ø-13/14
- cable
- piece of perf-board
- glue (cyanoacrylate)
- pogopins
- flash tool connector
- spring from clothpint
- optional cable sleeve
Simple bash script to batch flash ch32 mcu's using wlink
bash batchflash_ch32.s [chip] [path to bin] [amount to repeat]







