EiVhrva

High-speed DAPLINK downloader based on CH32V305

 
Overview
CH32V305-based High-Speed ​​DAP-LINK
Update Log:
2023-09-03 First Release
2023-09-04 00:45 Program readjusted before release; current test shows SWCLK clock reaches 10MHz, downloading 1000KB program takes approximately 8.5 seconds.
2023-09-04 15:04 Source code organized and attached.
2023-09-07 Firmware updated; cleared ORE bit before DMA reception to prevent serial port jamming; re-released code.
2023-09-08 Firmware updated; added IAP function; pressing and holding the IAP button while powering on allows re-downloading the program using LinkUtility.
2023-11-12 Firmware updated; upgraded CherryUSB version; further refactored program for increased stability.
2023-11-23 CMake-compiled firmware may have performance issues; MRS-compiled program provided for reference only; added a new V2 version. The PCB is smaller in size.
The project is currently unverified and not open source
(updated 11-12, refactored source code, built with CLion CMake; firmware can be downloaded as CH32V305FBP6_DAPLINK_1122.hex).
[https://gitee.com/fhcloud/ch32v305_dap](https://gitee.com/fhcloud/ch32v305_dap )
Project Description:
This is a high-speed DAPLINK based on the CH32V305FBP6. Originally, this project was intended for flashing the original WCH-LinkE firmware. However, it was discovered that the original LinkE firmware only supports USBFS, and the CDC serial port only supports a maximum baud rate of 921600, with packet loss during high-speed transmission and reception. Therefore, I ported the CherryDAP project from a senior developer, implementing DAP flashing and CDC serial port functionality under USBHS (480M).
This project is fully compatible with WCH-LinkE. Those who need RV kernel debugging can flash the original firmware; a flashing tutorial is provided below.
Features:

Utilizes CH32V305, built-in high-speed 480M USB PHY, supports up to 4M serial port transmission, SWD clock supports up to 10MHz
, includes SY6288DAAC, built-in reverse current and overcurrent protection, preventing external current from flowing back into the USB port .
3V3 power supply uses SY8089A1AAC 2A DCDC, supports high current output at 3V3.
TYPE-C interface for easy wiring.
Supports SWD and JTAG interfaces (high-speed JTAG can be flashed with WCH official firmware).
Fully compatible with WCH-LinkE firmware .

Soldering instructions:

Component model and attributes have been checked; simply refer to the BOM below for matching.
2520 inductors are only readily available from LCSC; difficult to find on Taobao. If needed, you can modify the package yourself.
Current limiting switch: Remember to purchase the SY6288D low-level active version; when replacing replacement parts, pay attention to the active level.
DC3 socket: Unless there are special requirements, a regular socket is sufficient. For a gold plating finish, purchase the socket listed in the BOM. If
the TYPE-C socket is unavailable, replace it with a TYPEC-304A-ACP series socket. (Represents plastic color; search "LCSC Mall" without **, multiple colors available).

Regarding purchasing finished products
, if you find soldering too complex, you can purchase the official WCH-LinkE, which is identical to this project except for layout. It's available on Taobao for 18 RMB with free shipping via SF Express
: https://item.taobao.com/item.htm?spm=a21n57.1.0.0.61a2523c0w8dMs&id=704098651367&ns=1&abbucket=15#detail
. Component reference purchase link
(for reference only)
: Orange TYPE-C in the image: https://item.szlcsc.com/3187113.html
CH32V305FBP6 (Note: Be careful not to buy the wrong model): https://item.taobao.com/item.htm?spm=a1z09.2.0.0.78a02e8dhbnpSI&id=691338382730&_u=32dklb45171d
SY6288D (Note: Be careful not to buy the wrong model!!): https://item.taobao.com/item.htm?spm=a1z09.2.0.0.78a02e8dhbnpSI&id=723759935239&_u=32dklb45916f
DC3 Horn Connector (Select Color Classification: 10P Specification: Curved Pin): https://item.taobao.com/item.htm?spm=a1z09.2.0.0.78a02e8dhbnpSI&id=712321967438&_u=32dklb45f6cd For
original WCH-LinkE firmware instructions
, please refer to the official WCH documentation. This project is fully compatible with WCH-LinkE:
https://www.wch.cn/products/WCH-Link.html
Program Description:
Source project program, thanks to the open-source contributor: https://github.com/cherry-embedded/CherryDAP
Currently developed using MRS Studio, the source code is released in the attachment. To burn the code, select "CH32V305FBP6_DAPLINK.hex" in the attachment to download.
Burning Instructions
: Prerequisites: You must have a WCH-Link chip. It is recommended to purchase LinkE, which supports full code flash erasure.
The chip used in this project has no BOOT pin. Using a first-generation WCH-Link chip will prevent it from being programmed again after initialization. Purchase link: https://item.taobao.com/item.htm?spm=a21n57.1.0.0.6ce4523cS2mfot&id=704098651367&ns=1&abbucket=15#detail
Switch WCH-LinkE to RV mode
and open WCH-LinkUtility (attached). Modify according to the screenshot: Connect WCH
-LinkE to the PCB to be programmed. Connect
the DIO and CLK of WCH-LinkE to the DIO and CLK of the PCB (the PCB also needs power), as shown in the figure below:
After connection, remove read protection in the software and read the chip information
(updated on September 8th, after the first programming, you can press the IAP button to power on and then refer to the steps below to download. The erase steps below are not required!).
Follow the steps in the figure below. If it cannot be read, it means that the chip's DIO/CLK is occupied. You need to refer to the next step to power on and erase.
Power-on erase
After programming, the DIO CLK pin will be occupied, preventing connection to the MCU. Power-on erasure is required. First, disconnect the PCB power supply and follow the instructions below to erase:
RST Erasure
Power-on erasure requires quick operation. If it fails multiple times, you can connect a jumper wire from the TP1 test point on the PCB to the RST reset pin of the LinkE or Link. Then select "Clear All Code Flash-By Pin NRST".
Programming
follows the steps shown in the image below. The original WCH-LinkE firmware is programmed in the same way.
References
: CherryDAP: https://github.com/cherry-embedded/CherryDAP
CherryUSB: https://github.com/cherry-embedded/CherryUSB
CherryRB: https://github.com/cherry-embedded/CherryRB
Original WCH-LinkE Schematic: https://www.wch.cn/downloads/WCH-LinkSCH_PDF.html
Original WCH-Link User Manual: https://www.wch.cn/downloads/WCH-LinkUserManual_PDF.html
CH32V305 chip datasheet: (attached)
WCH-LinkUtility: (attached)
Test images:
SWCLK pin frequency in 10M mode;
SWCLK frequency in 5M mode;
USB HS test;
CDC serial port loopback test (TX and RX connected together, no packet loss in 4M mode);
Soldering process
demonstration video
: https://www.bilibili.com/video/BV13m4y1M725/
PCB rendering
Rendered image 1.png
Rendered image 2.png
WCH-LinkUtility.ZIP
CH32FV2x_V3xRM.pdf
CH32V203DS0.pdf
CH32V305FBP6_DAPLINK_0908.hex
code.7z
CH32V305FBP6_DAPLINK_1122.hex
CH32V305FBP6_DAPLINK1123.hex
PDF_High-speed DAPLINK downloader based on CH32V305.zip
Altium - High-speed DAPLINK downloader based on CH32V305.zip
PADS - High-speed DAPLINK downloader based on CH32V305.zip
BOM_High-speed DAPLINK downloader based on CH32V305.xlsx
91433
electronic
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-26 13:56:33

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号