Skip to the content
PCBKitNew board
2 layers43 × 20 mmSample target basic, the printed circuit board in 3D

Sample target basic

alvarop/swd2usbc29

Have you ever wanted to debug your device over USB-C? Sometimes there's not enough room for a JTAG/SWD connector, or even Tag-Connect pads!

Size
43 × 20 mm
Copper layers
2
Thickness
1.6 mm
Parts
46
Nets
65
Pads
182
Tracks, vias
390, 47
Pours
1
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
5 Jan 2025
Updated
16 Mar 2025

Overview

Sample target basic is an open-source printed circuit board by alvarop, from the alvarop/swd2usbc repository on GitHub, published under the CC0-1.0 licence. It is a 2-layer board of 43 × 20 mm with 46 parts on 65 nets, routed with 390 tracks and 47 vias.

It is built around the RP2040, W25Q128JVSIQ and MIC5504-3.3YM5-TR, with the CL05B104KB54PNC, SKRKAEE020 and ABM8-272-T3 among its other parts. Its parts include 17 capacitors, 9 resistors, 3 ICs, 2 diodes and 2 connectors. It belongs with the RP2040 boards of this library.

Main components

7

README

README.md

SWD2USBC Project

Have you ever wanted to debug your device over USB-C? Sometimes there's not enough room for a JTAG/SWD connector, or even Tag-Connect pads!

For history and all of the details, check out my detailed write up here.

SWD2USBC

SWD2USBC

Full featured adapter with Debug Accessory Mode support. Includes an ATTiny microcontroller to set the correct pull-up resistors on CC1/CC2 to provide accurate charge current to the target. Has a USB-C plug so no extra USB-C cable required

SWD2USBC Firmware

The ATTiny firmware doesn't do much. It reads the voltage on the CC1/CC2 line that is pulled up and determines the available charge current. It then pulls up CC1 and CC2 to provide the charge current to the device under Debug Accessory Mode.

SWD2USBC Basic

SWD2USBC Basic Simple adapter with no Debug Accessory Mode. Assumes target SWD lines wired up directly to TX1/2 as listed above. Requires USB3/Thunderbolt C to C cable to connect to target.

Sample Target

Sample Target

Example target device. Fully featured with CC1/2 comparators to connect/disconnect SWD lines if Debug Accessory Mode is active. Target is an RP2040 instead of STM32 since it's easier to source.

Sample Target Firmware

The sample target firmware does basic USB charge detection using the CC lines. When the Debug Accessory Mode is enabled, both CC1/CC2 are used, otherwise, the single CC line is used. There's an LED (D3) which lights up when Debug Accessory Mode is enabled.

The charge current is printed out over UART, but it is also displayed using the two LEDs. The blink patterns are:

  • 500mA - LED1 (D1) blinks
  • 1500mA - LED2 (D2) blinks
  • 3000mA - Both LED1 (D1) and LED2 (D2) blink at the same time
  • Other/Error - Both LED1 (D1) and LED2 (D2) alternating blink

Sample Target Basic

Sample Target Basic

Basic example target. Similar to the sample target above, but does not include any comparators/switches. SWD lines are directly connected to the USB-C connector.

SWD2USBC Programmer

Simple adapter PCB to connect the AVRISP V2 connector to USB-C to program the ATTiny in the SWD2USBC device.

SWD2USBC Programmer

Parts

46
QtyValueFootprintReferences
110.1uFCapacitor_SMD:C_0402_1005MetricC3, C4, C7, C9, C11, C12, C13, C14, C15, C16, C17
9, , , , , , , ,
41uFCapacitor_SMD:C_0402_1005MetricC1, C2, C8, C10
45.1kResistor_SMD:R_0402_1005MetricR1, R2, R7, R8
31kResistor_SMD:R_0402_1005MetricR3, R6, R9
215pCapacitor_SMD:C_0402_1005MetricC5, C6
227Resistor_SMD:R_0402_1005MetricR4, R5
2LEDLED_SMD:LED_0603_1608MetricD1, D2
2SW_Pusheasyeda:SW-SMD_L3.9-W3.0-P4.45SW1, SW2
1ABM8-272-T3Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
1Conn_01x03Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ2
1MIC5504-3.3YM5Package_TO_SOT_SMD:SOT-23-5U1
1RP2040Package_DFN_QFN:QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mmU3
1USB_C_Receptaclealvarop:UT11113-11602-7HJ1
1W25Q128JVSPackage_SO:SOIC-8_5.23x5.23mm_P1.27mmU2

The 45 most common of 46 parts.

Questions

How big is the Sample target basic PCB?

It measures 43 × 20 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Sample target basic use?

46 parts, built around the RP2040, W25Q128JVSIQ, MIC5504-3.3YM5-TR and CL05B104KB54PNC. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Sample target basic KiCad files?

From the alvarop/swd2usbc repository on GitHub, at the commit this page was made from: the board is sample-target-basic/sample-target-basic.kicad_pcb and its schematic sample-target-basic/sample-target-basic.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Sample target basic design in my own project?

Its repository publishes it under the CC0-1.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

More from alvarop/swd2usbc

4
  • 4 layers51.8 × 20 mmSample target, the printed circuit board in 3D

    Sample target

    alvarop/swd2usbc

    Have you ever wanted to debug your device over USB-C? Sometimes there's not enough room for a JTAG/SWD connector, or even Tag-Connect pads!

    57 parts29CC0-1.0
  • 4 layers25.8 × 16 mmSwd2usbc, the printed circuit board in 3D

    Swd2usbc

    alvarop/swd2usbc

    Have you ever wanted to debug your device over USB-C? Sometimes there's not enough room for a JTAG/SWD connector, or even Tag-Connect pads!

    17 parts29CC0-1.0
  • 4 layers27 × 13 mmSwd2usbc basic, the printed circuit board in 3D

    Swd2usbc basic

    alvarop/swd2usbc

    Have you ever wanted to debug your device over USB-C? Sometimes there's not enough room for a JTAG/SWD connector, or even Tag-Connect pads!

    6 parts29CC0-1.0
  • 2 layers20.5 × 11 mmSwd2usbc programmer, the printed circuit board in 3D

    Swd2usbc programmer

    alvarop/swd2usbc

    Have you ever wanted to debug your device over USB-C? Sometimes there's not enough room for a JTAG/SWD connector, or even Tag-Connect pads!

    4 parts29CC0-1.0

Similar boards

  • 2 layers73.5 × 47.5 mmEinkBadge, the printed circuit board in 3D

    EinkBadge

    Las-Vejas/badge

    An E-ink badge run by RP2040, with NFC capabilities.

    67 partsGPL-3.0
  • 4 layers51 × 45 mmFlight controller atlas, the printed circuit board in 3D

    Flight controller atlas

    williamjroche/Drone_Flight_Controller

    This is a GPS-Denied Autonomous Drone that uses computer vision to fly with radio transmission override. Autonomy is a work in progress.

    66 parts1MIT
  • 4 layers82 × 55 mmSpark, the printed circuit board in 3D

    Spark

    ratmuds/spark

    The PCB files for this project. The gerber and other PCBA files are in the production folder.

    202 parts1
  • 4 layers86 × 34 mmBsl drv v1, the printed circuit board in 3D

    Bsl drv v1

    jackw01/scanlight

    A better light source for scanning color negative film

    157 parts397CERN-OHL-W-2.0
  • 4 layers39 × 92 mmChaac ng, the printed circuit board in 3D

    Chaac ng

    alvarop/chaac

    This is a work in progress for a wireless weather station project.

    82 parts21MIT
  • 2 layers34 × 45 mmRP2040 Module34D, the printed circuit board in 3D

    RP2040 Module34D

    phpbbireland/echo

    Echo Keyboards with QMK and VIA support

    48 parts3GPL-3.0
  • 4 layers277.2 × 107.5 mmKatia, the printed circuit board in 3D

    Katia

    ikajdan/katia

    A split keyboard with 6 by 3 column staggered keys and 3 thumb keys, based on the Crkbrd design

    230 parts33CERN-OHL-P-2.0