License

CC-BY-SA 3.0

Recommend Projects

SWD Programmer Stick

7 months ago 599
  • Description
  • Documents
  • BOM
  • Attachments
  • Members
  • Comments

Description

Overview

The SWD Programmer Stick is a CMSIS-DAP compliant debugging probe with SWD protocol support based on Free-DAP by Alex Taradov. It can be used to program Microchip SAM and other ARM-based microcontrollers. The SWD Programmer Stick is built around an ATSAMD11C14A microcontroller.

SWD_Programmer_Stick_pic1.jpg

CMSIS-DAP

CMSIS-DAP provides a standardized way to access the Coresight Debug Access Port (DAP) of an ARM Cortex microcontroller via USB. CMSIS-DAP is generally implemented as an on-board interface chip, providing direct USB connection from a development board to a debugger running on a host computer on one side, and over JTAG (Joint Test Action Group) or SWD (Serial Wire Debug) to the target device to access the Coresight DAP on the other. For more information refer to the CMSIS-DAP Handbook.

CMSIS-DAP.png

Compiling and Installing Firmware

You can either compile the firmware yourself, or you can use the precompiled binary. Since there is no dedicated header for programming on the board, the microcontroller should be programmed before soldering. The SAMD Programmer Adapter is helpful for this. In order to program the microcontroller after soldering, the solder pads on the underside of the board must be used.

SWD_Programmer_Stick_pic3.jpg

Compiling Firmware

  • Install GNU Arm Embedded Toolchain
  • Run "make all" inside the "source" folder
  • Use "Makefile_bl" if you want to compile for a 4KB bootloader

Installing Firmware using a CMSIS-DAP Device

  • Install OpenOCD
  • Connect the programmer to your PC and the target board. Make sure your target board is powered.
  • Run "openocd -f cmsis-dap.cfg" inside the "binaries" folder

Installing Firmware using a SEGGER J-Link Device with OpenOCD

  • Install OpenOCD
  • Connect the programmer to your PC and the target board. Make sure your target board is powered.
  • Run "openocd -f jlink.cfg" inside the "binaries" folder

Installing Firmware using a SEGGER J-Link Device with J-Link Commander

  • Install SEGGER J-Link Commander
  • Connect the programmer to your PC and the target board. Make sure your target board is powered.
  • Run "JLinkExe -commanderscript flash.jlink" inside the "binaries" folder

Solving the Chicken and Egg Problem

Unfortunately, you need another programmer to program the programmer. Here are a few cheap ways to do it:

SEGGER J-Link EDU Mini (Tested)

J-LINK EDU Mini is a version of the J-Link EDU in a reduced form factor with identical functionality as the larger devices. It has been designed to allow students and educational facilities as well as hobbyists access to top of the line debug probe technology. The device is available for around €16, the uploads are fast and it works reliably. It is not approved for commercial use.

SWD_segger.jpg

nanoDAP (Tested)

Debuggers based on the open source project nanoDAP are available on aliexpress for around €7. As CMSIS-DAP compliant devices, they work reliably and without problems.

SWD_nanoDAP.jpg

DAPLink Emulator (Tested)

These CMSIS-DAP compliant devices are available on aliexpress for around €10. They work fine too.

SWD_DAPLink.jpg

SAMD Development Boards (Not Tested)

There are options to use the EDBG of some development boards for programming an external device, or to program them using a special firmware. Information on this can be found on the following pages:

Operating Instructions

Connect the SWD Programmer Stick to the target board via the 10-pin connector or the pin header (RST / DIO / CLK / GND). Make sure the target board is powered. You can supply power via the 3V3 pin (max 150 mA) or the 5V pin (max 400 mA). Plug the SWD Programmer Stick into a USB port on your PC. Since it is recognized as a Human Interface Device (HID), no driver installation is required. The SWD Programmer Stick should work with any debugging software that supports CMSIS-DAP (e.g. OpenOCD). Of course, it also works with the SAMD DevBoards in the Arduino IDE (Tools -> Programmer -> Generic CMSIS-DAP).

SWD_Programmer_Stick_pic2.jpgSWD_Programmer_Stick_pic4.jpg

References, Links and Notes

  1. Original Free-DAP Project
  2. CMSIS-DAP Handbook
  3. GNU Arm Embedded Toolchain
  4. OpenOCD
  5. SEGGER J-Link Commander
  6. nanoDAP
  7. Adafruit DAP
  8. ARMmbed DAPLink
  9. Black Magic Probe

Documents

SWD Programmer Stick

SWD_Programmer_Stick_v1.0

BOM

ID Name Designator Footprint Quantity
1 100n C1 0603 1
2 10u C2 0603 1
3 1u C3,C4 0603 2
4 SWD-Connector H1 SWD-CONNECTOR-SQUARE 1
5 SWD H2 210S-6X1/2.54 1
6 HDR-M-2.54_1x1 H3,H4,H5 PADS-SMALL 3
7 PRG LED1 LED0603 1
8 PWR LED2 LED0603 1
9 10k R1,R2 0603 2
10 330R R4,R5,R6 0603 3
11 1k R7,R8 0603 2
12 ATSAMD11C14A U1 SOIC-14_150MIL 1
13 XC6206P332MR U2 SOT-23-3_L2.9-W1.6-P1.90-LS2.8-BR 1
14 USB-Plug USB1 USB-M-48 1

Attachments

None
Success
The owner does not allow comments in this project now

Comments (0)

goToTop
你现在访问的是EasyEDA海外版,使用建立访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow
We use cookies to offer you a better experience. Detailed information on the use of cookies on this website is provided in our Privacy Policy. By using this site, you consent to the use of our cookies.