cancel
Showing results for 
Search instead for 
Did you mean: 

SWD DEBUG Communication STM32H7 ISSUE

geek12
Associate II

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.

11 REPLIES 11
KnarfB
Principal III

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

MM..1
Chief II

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.

geek12
Associate II

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.

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 ...

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

search and enable too support debuging low power modes xheckbox

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

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

KnarfB
Principal III

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