Questions tagged [swd]

Serial Wire Debug (SWD) is a 2-pin electrical alternative JTAG interface that shares a common functional protocol with JTAG for processor debug.

Since SWD is an alternative physical protocol to JTAG, it can leverage much of the existing knowledge, techniques and tooling that exist for JTAG. However, SWD is typically not used for scan-testing.

See also

148 questions
63
votes
4 answers

JTAG vs SWD debugging

After skimming through this article, I am wondering what are the benefits of SWD debugging over JTAG debugging? I understand SWD uses less wires/pins, takes up less space etc. But how does it play out in terms of performance, features and cost of…
josef.van.niekerk
  • 3,600
  • 7
  • 44
  • 63
24
votes
0 answers

Switch from JTAG to SWD with bitbang sequence on STM32F103VB

I am trying to switch from JTAG to SWD without any external devices. Why? Because I would like to use the SWO pin to send a stream of logging information to another device. To accomplish this without using an external debugger, I have connected the…
Heneer
  • 489
  • 7
  • 12
21
votes
5 answers

Can I use ST-Link programmer for non-ST chips?

Can I program all kinds of SWD-programmable chips (ARM-MCUs) with ST-Link?
Meylis Cherkezov
  • 211
  • 1
  • 2
  • 3
19
votes
1 answer

How do I print debug messages to gdb console with STM32 discovery board using GDB, OpenOCD and arm-none-eabi-gcc?

I'm programming an STM32 Cortex M0 discovery board (32F0308DISCOVERY) using OpenOCD, arm-none-eabi-gcc, and gdb. I was wondering if there is any straightforward way to log debug messages over SWD. I've read about the semihosting option, but this…
foldl
  • 591
  • 1
  • 5
  • 14
18
votes
2 answers

How to use external ST-Link to debug/program STM32F103 MCU?

I'm using STM32F103 MCU for my own project and want to use the ST-Link of STM32F411 Nucleo board for external debugging / programming purposes. I've set the CN2 jumpers OFF and my actual question is in the pinouts of SWO (CN2). How I proceed on this…
baqx0r
  • 311
  • 1
  • 4
  • 13
10
votes
1 answer

Cannot Program a Custom STM32 Board

I've designed a simple STM32 board. Below are the schematic and pcb layout pictures: Schematic: PCB layout: PCB layout with VDD hightlighted: PCB layout with GND highlighted: Only the parts of this design which are relevant to my question are…
user3286500
  • 171
  • 1
  • 8
9
votes
2 answers

SWDAP vs CMSIS-DAP vs DAPLink

EDIT : I got the basic questions (for example, what is CMSIS-DAP?) answered by user @Nipo. Based on that, I restructured my post in a more logical way. Hopefully the remaining questions will be answered as well :-)   1. Programming a…
K.Mulier
  • 2,327
  • 3
  • 21
  • 40
9
votes
2 answers

How to Use an External ST-Link/V2 with the STM32F4 Discovery Board

I have a STM32F4 Discovery board and a ST-Link/V2 programmer. I want to use my own ST-Link (not the embedded one) for programming and debugging the board. How should I connect the external ST-Link to the board ?
maddouri
  • 211
  • 1
  • 2
  • 8
8
votes
2 answers

Relationship between reset pins and SWD functions (ARM Cortex M0)

On many microcontrollers or other devices without JTAG/SWD functionality, there is a reset pin which when low unconditionally and asynchronously forces everything into a known state. On devices with JTAG or SWD functionality, however, things seem…
supercat
  • 45,939
  • 2
  • 84
  • 143
7
votes
2 answers

STM32L MCU - SWD pin on board not matching processor pinout

I was doing my hardware hack project on an air quality monitoring device which uses STM32L476 processor. My only experiences with hardware hacking are IPcams or wifi routers with UART consoles available. But, after some probing and trying, I was…
Jimmy.D
  • 137
  • 2
  • 9
5
votes
1 answer

New debug connectors for ARM

There is a big confusion in my head about debug connectors for ARM microprocessors. If I just take a look at this documentation there are a couple of JTAG connectors mentioned: Cortex 10-pin JTAG/SWD (usualy 0.05" pitch) which supports JTAG debug,…
71GA
  • 613
  • 1
  • 13
  • 30
4
votes
1 answer

OpenOCD w/ ARM-USB-OCD-H+ARM_JTAG_SWD

Has anyone been able to debug/program using SWD over a Olimex USB-JTAG programmer and the ARM-JTAG-SWD adapter? If so, please share how you did it :) Specifically, I'm looking for what the OpenOCD configuration files would look like.
user31308
  • 41
  • 2
4
votes
3 answers

Laying out a 10-pin JTAG/SWD connector on a final design

I'm designing a board with an ARM microcontroller on it (LPC1347FBD48) and I want to include a 10 pin jtag/swd connector, as is standard, for in-circuit debugging of my final design. Here is the pinout (datasheet pg9): (don't mind the cut-off text…
tummychow
  • 631
  • 2
  • 9
  • 18
4
votes
1 answer

Cannot connect to STM32 after programming without activating SWD pins

We were testing the STM32 on a custom board. We were able to program it through SWD pins and an external ST link. Unfortunately, we didn't activate the SWD pins in the .ioc file. Now we cannot connect to it and we are not able to erase the board…
4
votes
1 answer

USB-C Debug Accessory Mode and USB 2.0

I want to build an embedded device which is using a USB-C for debugging purposes and USB 2 functionality. Now I am not sure whether or not I understood the USB-C Standard correctly. Is it correct, that if I connect the CC1 and CC2 to pin with a…
NIN
  • 43
  • 1
  • 3
1
2 3
9 10