WCH WCH-Link

Contents

WCH-Link Debugger/Programmer User Manual

Model: WCH-Link

1. Introduction

The WCH-Link is a versatile debugger and programmer module designed for microcontrollers based on RISC-V and ARM architectures. It facilitates firmware downloading, online debugging, and serial communication, making it an essential tool for embedded system development, including applications in intelligent automobile competitions and general MCU projects. Its compact design and USB-C interface offer convenience and broad compatibility.

2. Package Contents

Please verify that all components are present in your package:

  • WCH-Link Debugger/Programmer Module
  • Male Header Pins (typically included for connection)

3. Setup Guide

3.1 Hardware Connection

The WCH-Link module connects to your target microcontroller via the Serial Wire Debug (SWD) interface and optionally provides power. Refer to the pinout diagram below for correct connections.

Top-down view of the WCH-Link debugger's front side, showing pin labels
Figure 1: WCH-Link Front Pinout
Back view of the WCH-Link PCB, displaying the 'WCH-LINK RISV-V & ARM' branding and a clear diagram of the pinout for various connections including power (3V3, 5V, Gnd), serial communication (Tx, Rx), and SWD interface (SWD IO, SWD CLK).
Figure 2: WCH-Link Back Pinout Diagram

Connection Table:

WCH-Link PinTarget MCU PinDescription
SWD IOSWDIOSerial Wire Data Input/Output
SWD CLKSWCLKSerial Wire Clock
GndGNDGround Connection
3V3VCC (3.3V)3.3V Power Output (optional, for powering target)
5VVCC (5V)5V Power Output (optional, for powering target)
TxRxUART Transmit (WCH-Link to Target Receive)
RxTxUART Receive (WCH-Link to Target Transmit)
ConnectRST/NRSTReset Pin (connect to target's reset if needed)
RunN/AFunction button on WCH-Link

Important Notes:

  • Ensure the target MCU's operating voltage matches the voltage supplied by the WCH-Link (3V3 or 5V). Do not power the target from both the WCH-Link and an external source simultaneously unless specifically designed for it.
  • Always connect the Ground (Gnd) pins between the WCH-Link and the target MCU.
  • For SWD debugging, SWD IO and SWD CLK are mandatory.
  • The Tx/Rx pins are for UART serial communication, useful for console output from the MCU.

3.2 Software Installation

Before using the WCH-Link, you will need to install the necessary drivers and development tools on your computer:

  1. Drivers: Connect the WCH-Link to your computer via a USB-C cable. Your operating system may automatically install the required drivers. If not, visit the official WCH website or the product's support page to download and install the latest drivers.
  2. IDE/Toolchain: Install a suitable Integrated Development Environment (IDE) and toolchain for your target MCU (e.g., MounRiver Studio for WCH MCUs, Keil MDK, IAR Embedded Workbench, or a GCC-based toolchain with OpenOCD and GDB for ARM/RISC-V).
  3. Configuration: Configure your IDE to use the WCH-Link as the debugger/programmer. This typically involves selecting 'WCH-Link' or 'CMSIS-DAP' as the debug probe and specifying the SWD interface.

4. Operating Instructions

4.1 Firmware Download (Flashing)

  1. Connect the WCH-Link to your computer and the target MCU as described in Section 3.1.
  2. Open your chosen IDE or flashing utility.
  3. Load the firmware file (e.g., .hex, .bin, .elf) into the software.
  4. Initiate the download/flash process. The WCH-Link will communicate with the target MCU to write the firmware to its flash memory.
  5. Monitor the software for completion and any error messages.

4.2 Debugging

  1. Ensure the WCH-Link is correctly connected to the target MCU and your computer.
  2. Open your IDE and load your project.
  3. Start a debug session (usually by clicking a 'Debug' or 'Start Debugging' button).
  4. The IDE will connect to the target via the WCH-Link, allowing you to set breakpoints, step through code, inspect variables, and monitor registers.
  5. Use the 'Run' button on the WCH-Link module if your setup requires a manual reset or specific action to enter debug mode.

4.3 Serial Communication

If you have connected the Tx/Rx pins, you can use a serial terminal program (e.g., PuTTY, Tera Term, or the serial monitor in your IDE) to communicate with your target MCU. Ensure the baud rate and other serial settings match those configured in your MCU's firmware.

5. Care and Maintenance

  • Handling: Handle the module with care to avoid physical damage. Avoid bending or stressing the PCB.
  • Static Discharge: Always take precautions against electrostatic discharge (ESD) when handling the module, as electronic components are sensitive to static electricity.
  • Storage: Store the WCH-Link in a dry, dust-free environment, away from extreme temperatures and direct sunlight.
  • Cleaning: If necessary, gently clean the module with a soft, dry cloth. Do not use liquids or abrasive cleaners.
  • Power: Ensure correct voltage is applied to the target if powering it via the WCH-Link. Incorrect voltage can damage both the debugger and the target MCU.

6. Troubleshooting

  • Debugger Not Detected:
    • Check USB-C cable connection to both the computer and the WCH-Link.
    • Verify that the correct drivers are installed on your computer.
    • Try a different USB port or computer.
  • Cannot Connect to Target MCU:
    • Double-check all SWD (SWD IO, SWD CLK, Gnd) connections between the WCH-Link and the target.
    • Ensure the target MCU is powered correctly (either by WCH-Link or an external source).
    • Verify the target MCU's voltage is compatible with the WCH-Link's output (3V3/5V).
    • Check the target MCU's reset line and ensure it's not held in reset.
    • Confirm the target MCU is not locked or protected against debugging.
    • Ensure the correct target device is selected in your IDE's debug configuration.
  • Firmware Download Fails:
    • Check all connections as above.
    • Ensure the firmware file is valid and compatible with the target MCU.
    • Verify sufficient power supply to the target during flashing.
  • Serial Communication Issues:
    • Check Tx/Rx and Gnd connections.
    • Ensure the baud rate and other serial settings in your terminal program match the MCU's configuration.
    • Confirm the MCU is actually transmitting data.

7. Specifications

FeatureDetail
InterfaceUSB-C
Debugging/Programming InterfaceSWD (Serial Wire Debug)
Supported ArchitecturesRISC-V, ARM
Power Output3.3V, 5V (selectable/available via pins)
Dimensions (approx.)37mm (Length) x 19mm (Width)
Main ChipCH549G
Angled view of the WCH-Link debugger, highlighting its compact dimensions of 19mm width and 37mm length.
Figure 3: WCH-Link Dimensions

8. User Tips

No specific user tips were available from reviews or Q&A at this time. General advice for embedded development includes:

  • Always double-check your wiring before powering on to prevent damage.
  • Start with simple 'blink' programs to verify your toolchain and debugger setup.
  • Keep your IDE and debugger drivers updated for best compatibility and performance.

9. Warranty and Support

For warranty information, technical support, and further resources, please refer to the manufacturer's official website or contact your point of purchase. Ensure you have your product model and purchase details available when seeking support. Source · https://manuals.plus/ae/1005010641829454

Documents and downloads

Ask a question about this manual

Ask about setup, troubleshooting, compatibility, parts, safety, or missing instructions. Manuals+ will review the question and use this page’s manual context to help answer it.

After a successful submission, we securely hash the supplied account or form email before sending it to Microsoft Advertising for conversion attribution. Privacy details.

Rate this product if you’ve used it

Was this page helpful?