2021-11-13 01:09 AM
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.
2021-11-13 04:01 AM
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
2021-11-13 05:56 AM
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.
2021-11-13 11:08 AM
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.
2021-11-13 11:20 AM
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 ...
2021-11-13 11:20 AM
I have test different mode using STM32Cube programmer(connect Under Reset, Hot plug) to flash/erase without succeed (no target is detected msg).
2021-11-13 11:23 AM
search and enable too support debuging low power modes xheckbox
2021-11-13 11:23 AM
I have test different mode using STM32Cube programmer (Connect Under Reset, Hot plug ) to flash/erase without succedd (no target is detected msg)
2021-11-13 11:29 AM
Is there any procedure to erase the MCU flash memory, or how can I test DEBUG pins : SWDIO and SWDCLK
2021-11-13 11:29 AM
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