Questions tagged [swd]

SWD (Serial Wire Debug) is a lightweight alternative to JTAG debug port.

Serial Wire Debug (SWD) is an alternative 2-pin electrical interface that uses the same protocol. It uses the existing GND connection. SWD uses an CPU standard bi-directional wire protocol, defined in the ARM Debug Interface v5. This enables the debugger to become another bus master for access to system memory and peripheral or debug registers. Data rate is up to 4 Mbytes/sec at 50 MHz. SWD also has built-in error detection. On JTAG devices with SWD capability, the TMS and TCK are used as SWDIO and SWCLK signals, providing for dual-mode programmers.

37 questions
13
votes
3 answers

STM32CubeIDE can only flash once, no SWD debugging

For a couple of years I have been using the mbed online compiler to create .bin files, and then flash them at the command line like this, using a ST-LINK/V2 USB dongle, and everything works flawlessly: st-flash write 01_blink.NUCLEO_F103RB.bin…
iforce2d
  • 8,194
  • 3
  • 29
  • 40
11
votes
6 answers

Error in initializing ST-Link Device - Failed to connect to device

I am currently using the ST-Link debugger to program my STM32F3 Discovery Board. The IDE that I am using is Atollic TrueStudio 5.5.2. Now I am facing a very weird problem which is I keep on getting the message Error in initializing ST-Link Device.…
Leonard1995
  • 141
  • 1
  • 2
  • 10
8
votes
2 answers

How to ping a chip (detect if a chip is connected) with OpenOCD

1. The problem explained I'm trying to use OpenOCD for something uncommon. Instead of connecting to the chip, I'd like to merely detect the chip. The procedure I have in mind would look like this: Start OpenOCD with the probe config file (eg.…
K.Mulier
  • 8,069
  • 15
  • 79
  • 141
3
votes
6 answers

Stm32CubeProgrammer not connecting (no error msg) using ST-LINK V2 dongle and Lora E5 mini board

I've tried countless settings in an attempt to program my stm32 board. The main tutorial I followed is https://wiki.seeedstudio.com/LoRa_E5_mini/. I have connected a USB st-link v2 dongle to my laptop with pins SWDIO, SWCLK, GND correctly wired to…
Cu29p
  • 51
  • 1
  • 4
3
votes
2 answers

How can I program an ARM MCU using SWD under Linux?

I'm working with an STM32 ARM Cortex MCU. It supports a protocol called SWD (serial-wire debugging). Looking around on the web, I've found arm-none-eabi-gcc which seems to be a decent compiler, but on the hardware side I haven't really found a…
Venemo
  • 18,515
  • 13
  • 84
  • 125
2
votes
1 answer

What is the ISO document for SWD?

I would like to know, is there any standard document is exist for SWD (serial wire debug protocol). As I know for JTAG they have a standard document like IEEE 1149-1, similarly is there any standard document for SWD (serial wire debug…
Manodpdy
  • 21
  • 1
2
votes
1 answer

Controlling Nordic nRF52 via SWD interface

I am trying to program/halt/boot/erase etc. a Nordic Semi MCU. This is the ARM-Cortex M4 in nRF52. I am using the SWD pins of the chip and can achieve this if I use the commercial J-Link with the nrfjprog command-line tool or their Segger windows…
guraaf
  • 163
  • 4
  • 12
1
vote
0 answers

Write to RTT using pylink-square library

Using this example of the pylink git repo, I am able to send commands to my Nordic Board and control it over the RTT. Now, I derived my own little python script from this example, where I want to send one command: def write_rtt(): jlk =…
ilja
  • 109
  • 7
1
vote
1 answer

Olimax STM32-E407 cannot connect over SWD

Good day The problem: I am trying to connect/flash/debug a Olimax STM32-E407 dev board over SWD and I am not able When trying to connect, using CubeProgrammer, I get: "No STM32 Target Found" What I have tried: I have connected a ST-link V3 mini…
Misha
  • 556
  • 1
  • 8
  • 25
1
vote
0 answers

Programming external QSPI flash Raspberry Pi Pico

I want to reprogram the external flash of a raspberry Pico via SWD line. This feature must be implemented in a different microcontroller, not from a Linux computer so the OpenOCD library cannot be used. I already wrote a C library that is able to…
Luca
  • 61
  • 1
  • 7
1
vote
1 answer

'undefined debug reason 7 - target needs reset' Error when debug ARM Cortex-M33 using OpenOCD in FTDI SWD Mode

I am currently using OpenOCD to debug Cortex-M33 processor. However, after it connects to gdb and starts debugging, it shows the following message: Try to search windows process Found openocd running, Kill it SUCCESS: The process "openocd.exe" with…
AdamZhang
  • 11
  • 2
1
vote
1 answer

STM32: STLink won't connect through SWD any longer

The first flashing went fine, subsequent flashings fail with Error in initializing ST-LINK device. Reason: No device found on target. On an STM32H745 NUCLEO board I have enabled the DEBUG interface and SWO pin by mistake. Is there a way to hard…
kellogs
  • 2,837
  • 3
  • 38
  • 51
1
vote
1 answer

what is the relation between SWD frequency and MCU frequency?

I'm trying to connect to my board with SWD(serial wire debug) for frequency=4000khz with MCU which fixed frequency is 15KHz but it failed to connect. Is there a specified relation or formula between this tow frequency to have max SWD frequency for…
RAMZI
  • 21
  • 6
1
vote
1 answer

Issues in Debugging program in Atollic TrueStudio

I have designed a circuit in which I am using STM32L452RETx micro-Controller on PCB. This is basically a current sensor. I am using JTAG-20 connector for debugging. I am using Atollic TrueStudio IDE. The issue is when I debugg program in TrueStudio…
1
vote
1 answer

OpenOCD Failed to execute MI command: -target-select remote localhost:3333

I'm used to using Segger at work, but I didn't want to spend that kind of money for home use, so this is my first time using OpenOCD for debugging. I've got the Olimex ARM-USB-TINY-H. My OS is Ubuntu. I'm using MCUXpresso (Eclipse) with the OpenOCD…
M_J
  • 316
  • 5
  • 20
1
2 3