Skip to main content
Visitor II
November 13, 2021
Question

SWD DEBUG Communication STM32H7 ISSUE

  • November 13, 2021
  • 4 replies
  • 3921 views

Hi everybody,

I'm facing to a strange issue linked to debug using SWD interface with my STLINK V3 for my µC STM32H7. I can download firmware .bin using TeraTerm (using UART RS232).However I'm unable to communicate using STM32Cube IDE in debug mode or STMCube Programmer to erase or load .bin firmware, I get message "no STM32 target detected". By removing the MCU with a new chip, I recover debug/flash functionnality. So my question, is it possible to have just SWDIO and SWCLK pins "damaged" and then no communication in debug mode ? If not, how can I test or erase chip in my case and recover debug functionnality ?

Thanks for your support.

    This topic has been closed for replies.

    4 replies

    Super User
    November 13, 2021

    Firmware can program those pins to other functions such that debugging is only possible immediately after a hardware reset before the firmware kicks in.

    The SWD pins are, if not reconfigured, internally connected to an on-chip pull-down (SWCLK) respectively pull-up (SWD) resistor which you should be able to detect/measure.

    hth

    KnarfB

    geek12Author
    Visitor II
    November 13, 2021

    I have test different mode using STM32Cube programmer (Connect Under Reset, Hot plug ) to flash/erase without succedd (no target is detected msg)

    Graduate II
    November 13, 2021

    If you in code use SWD pins and init gpio, you need for connect without error set connect under reset mode.

    Second problem is use low power mode for example STOP, same error.

    geek12Author
    Visitor II
    November 13, 2021

    I have test different mode using STM32Cube programmer(connect Under Reset, Hot plug) to flash/erase without succeed (no target is detected msg).

    Graduate II
    November 13, 2021

    search and enable too support debuging low power modes xheckbox

    geek12Author
    Visitor II
    November 13, 2021

    Thanks for your support. So if I understand, it is not possible to have just SWCLK/SWD pins damaged ? And my issue is just a problem linked to configuration pin in my firmware.

    Graduate II
    November 13, 2021

    Maybe yes maybe not, but debug reset setup and firmware as descripted block debug access.

    Stlink in minimal uses two wires SWDIO-SWDCLK, but for complete need use too RST SWDO ...

    geek12Author
    Visitor II
    November 13, 2021

    Is there any procedure to erase the MCU flash memory, or how can I test DEBUG pins : SWDIO and SWDCLK

    Super User
    November 13, 2021

    It is possible to nuke individual pins, but its worth checking if you really did. What happened to the new chip, can you re-flash it without issues? What board, a custom PCB or a Nucleo or such? If so, are the jumpers set correctly?

    hth

    KnarfB

    geek12Author
    Visitor II
    November 13, 2021

    It is a custom board with an STM32H7 MCU and with an UART bootloader. I can flash the MCU using bootloader (TeraTerm) however using DEBUG mode I get error msg(no target found). My application operates correctly when I flash the firmware using the UART bootloader. Also using STMCube programmer I cannot erase the MCU

    Graduate II
    November 13, 2021

    Maybe show image  STLINK V3 and schematics how you connect it helps