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.

Filter by
Sorted by
Tagged with
40
votes
4answers
48k views

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 ...
16
votes
2answers
48k views

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 ...
14
votes
1answer
14k views

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'...
11
votes
0answers
342 views

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 ...
10
votes
3answers
7k views

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

Can I program all kinds of SWD-programmable chips (ARM-MCUs) with ST-Link?
9
votes
1answer
2k views

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 ...
7
votes
2answers
2k views

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 ...
7
votes
2answers
19k views

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 ...
5
votes
2answers
1k views

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 ...
4
votes
2answers
4k views

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 ...
3
votes
3answers
9k views

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 ...
3
votes
1answer
2k views

Programming a new STM32 chip

I am new to STM32 and recently trying to make a custom board with STM32F103RB. But I am a bit confused by the available methods to program the chip. Let's say I use ST-Link via SWD, does it mean that ...
3
votes
2answers
979 views

Finding an affordable integrated USB MCU [closed]

I'm in the early stages of designing a development board around Cypress Semiconductor's PSoC 3 and 5 range of chips. Much like the Arduino, I'd like the programming experience to be very easy, and ...
3
votes
3answers
2k views

STM32F303K8T6 custom board

I try to make a custom board for the STM32F303K8T6 and I am not sure if I do it right. Actually the design is oriented on the STM32F3Discovery. I will not run time critical applications so that I don'...
3
votes
1answer
720 views

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 ...
2
votes
1answer
1k views

Can i connect something else to programming pins in STM32 (SWD)?

As in the topic: Can i connect something else to programming pins in STM32 (SWD)? For example a single LED with current limiting resistor connected to SWDIO and SWCLK pins. Will this load affect ...
2
votes
1answer
414 views

How can I design my PCB in a way I can debug the Atmel microcontroller on board?

We are designing a board around Atmel SAM4E microcontroller, and use Atmel-ICE for debugging/programming. To save space, we would like to avoid including the whole ICE connector. Which are the minimum ...
2
votes
1answer
775 views

Hand-made interface to SWD to write flash of ARM chip

I'm interested in creating simple interface to SWD to be able to write flash memory of ARM chips. I.e. to create a make-shift programming device - more for sake of exercise. I started reading the ...
2
votes
1answer
1k views

SWD and i2C hardware layer differences

Both I2C and SWD are two-wire protocols. I wonder what are the main differences of the hardware layer of these protocols and what are the pros/cons of each one? It's also interesting that the maximum ...
2
votes
1answer
4k views

How to daisy chain SWD Debug port

I have multiple mcu's that are configured to communicate with bus topology. I have 10 pins (4 of them is occupied by now) I need to debug (update firmware online, etc) all of these mcu's. I read this ...
2
votes
3answers
1k views

SWD debugging solution

I'm planning to start a project based around a Freescale Cortex-M0+ chip. Apparently the M0+ is SWD only and does not support JTAG. I've been looking around, but I can't find much in the way of SWD ...
2
votes
1answer
129 views

Segger ATSAME54N20 SWD error

INTRODUCTION I'm trying to program a custom board I designed, featuring a SAME54N20 MCU. My programming probe is a J-Link EDU (version 10.1), connected to my board using a Olimex adapter with a 10 ...
2
votes
2answers
6k views

Programming STM32: JTAG/SWD vs bootloader

I'm making a PCB for a personal project using the STM32L031K6T7 microcontroller. It looks like this uC has a bootloader that can be used to reprogram the flash program mem through UART or SPI. It also ...
2
votes
1answer
1k views

Unable to program Freescale Kinetis KL26 microcontroller over SWD

I just assembled a board that I have created that basically acts as a breakout board for a MKL26Z32VFM4. Today, I am trying to get it to communicate over SWD so I can program the initial bootloader. I'...
2
votes
1answer
112 views

Can I leave SWO/TDO and TDI of J-Link floating?

I'm designing a board with cortex-m4f having only SWDIO and SWCLK. I'm drawing schematics for J-Link's 9-pin JTAG/SWD connector, and I wonder if I can leave the SWO/TDO and TDI pins floating. J-Link'...
2
votes
2answers
969 views

Maximum length of SWD signal lines?

What is the maximum length of SWD signal lines / ribbon cables? Any idea what the physical layer of SWD is?
2
votes
1answer
1k views

Using ST-link for 1.8V target voltage

I'd like to program a LIS331EB which is an ST product with an integrated cortex-M0 core. ST says it can be programmed with ST-link even though it is neither an STM32 nor STM8. The lis331eb's core and ...
2
votes
2answers
2k views

STM32 SWD Issue

Greeting, I'm facing an issue while trying to program STM32L151C6 using STM32F4 Discovery board as programmer. What I did are the following: I removed CN3 jumpers from STM32F4 Discovery board page ...
2
votes
1answer
515 views

SWD optoisolation problem

I have designed the following optoisolator for SWD interfacing with an STM32 device and J-LINK programmer: This is the generic schematic: And this is a single optoisolator schematic: I am not able ...
2
votes
3answers
743 views

Unable to program ATSAML21 PCB via SWD - Problem with connection?

Well, I'm officially stumped (and so are several other engineers)... I have a custom PCB running an Atmel ATSAML21E18B microcontroller, which I'm trying to program through an Atmel ICE debugger / ...
2
votes
1answer
913 views

Sharing ARM SWD pins with normal pin function (on Atmel SAM D09 D10 D11)

The Atmel SAM D09 (an ARM Cortex M0+ MCU) can enable normal pin functions on the pins that are normally used for programming (SWD). But in doing so I presume that debugging will become impossible ...
2
votes
1answer
1k views

Multiple errors when writing image file with OpenOCD and Stlink v2 to NRF51822

I want to flash a firmware on my nrf51822 module I was trying an example from Nordic, I concatenated the bin file with the s110 file and it worked fine. Now, when I went ahead to flash the bin file, ...
2
votes
3answers
523 views

Can you safely “short circuit” 2 signals when they compete for the same pin to avoid having to use a multiplexer?

I'm developing for a very limited, 8 pin LPC810 microcontroller and have to connect multiple signals on a single pin. Obviously, if there's only 1 output signal on a bus, that should be OK, but what ...
2
votes
2answers
776 views

Debugging STM32LF1xx low-power behavior

Is there any practical way to use a SWD-based debugger such as those made by Segger to debug a program for the STM32LF1xx which uses low-power modes and sets the clock speed very slow? The debugger ...
2
votes
0answers
72 views

Weird SWD debug port behaviour

Today I have started to encounter strange problems with SWD debugging. The debug only works if I keep my finger on the SWD pins. To be more interesting I have the same problem with the boards I was ...
2
votes
1answer
1k views

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/...
1
vote
1answer
126 views

BOOT0 vs BOOT1 circuit design in STM32f103 (ST-LINK)

I have a question about designing st-link v2. According to the schematics provided by st.com Please help me in analyzing this schematic. Why boot0 was pulldown with a 100k resistor but connected boot1 ...
1
vote
1answer
588 views

ST-Link debugger/programmer failed to find STM32L152 MCU on designed PCB

I'm using STM32L152 MCU on my own project. The project was started on a STM32 Discrovery board. Now I would like to have my own board by designing a PCB with the MCU. An external ST-Linkv2 will be ...
1
vote
1answer
2k views

How do I get a chinese nRF51822 development kit running examples with an ST-link, Keil uVision?

I've been working at this for days with not much information out there to assist me in fixing my issues, so I figured I'd make a post here. I'm using a cheap chinese nRF51822 module and motherboard ...
1
vote
2answers
3k views

ARM Cortex reset button and debug interface (SWD)

I am designing a circuit using the EFM32ZG222 MCU (an ARM Cortex M0+) and I need to use the SWD interface (with a 10-pin Cortex Debug Connector) along with a reset button. I found a schematic that ...
1
vote
2answers
155 views

SAMD21 - How do I write to NVM fuses?

I'm trying to program the ATSAMD21G18 on Adafruit Feather M0 and over SWD Using a Segger J-Link EDU Nano. When I try to download the program to the chip through Atmel Studio it fails verification at ...
1
vote
1answer
138 views

SWD AHB-AP access gives ACK_FAULT

When attempting to debug a STM32L471RGT6 chip over SWD, I encounter an ACK_FAULT whenever sending an AP request to halt the core. I've implemented the following sequences which all work correctly, ...
1
vote
2answers
5k views

STM32 & ST-LINK - SWD connector not working

I am using an ST-LINK/V2 debugger (Firmware version V2.J27.S6, up-to-date) to program my STM32F407G discovery board. So far, I have been using USB to flash the MCU, using the STM32 ST-LINK Utility v4....
1
vote
2answers
2k views

Is SWD with an FTDI chip a universal programmer solution?

I have searched high and low (in fact I have spent the recent months on and off trying to find an answer). Maybe I'm not asking the right questions, or am staring the answer in the face, I'm not sure. ...
1
vote
1answer
402 views

AT89S8253 and Keil ULINK2 debugger connection?

I'm trying to connect AT89S8253 with Keil ULINK2. But the documentation is nil about 8051 controllers. As per the web, the pin connection is this. ref: http://www2.keil.com/coresight/coresight-...
1
vote
2answers
53 views

How can I run an STM32L with an unpowered ST-Link connected?

I have an STM32L476RG on a custom board that I have to leave connected to an external ST-Link/V2 so that I can reprogram it without accessing the hardware. I'm also forced to do this via a USB hub due ...
1
vote
1answer
69 views

Correct wiring of Cortex-M 10-pin Debug Connector

The ARM Cortex-M 10-pin debug connector has five interesting signals, in the original PDF they're named: SWDIO / TMS SWDCLK / TCK SWO / TDO NC / TDI nRESET For MCUs which only support SWD and which ...
1
vote
1answer
29 views

Segger J-Link Supply Adapter

I have a microcontroller powered at 1.8V and I break out V_target, SWD, SWCLK, ...
1
vote
2answers
354 views

JTAG, SWD, EDBG, ICSP, ISP terms

JTAG, SWD, EDBG, ICSP, ISP . Can someone simply explain their differences. For example if EDBG debugger can ALSO program flash, why Arduino boards have both ISP and EDBG ? http://www.armlearning....
1
vote
1answer
628 views

ST-Link V2 Programming STG-850 PLC — STM32

I'm trying to connect to a Barth STG-850 PLC for the first time and am using the ST-Link V2 programmer (not the ISOL version) and have been unsuccessful so far. The crux of my problem likely stems ...