Hi,
I’m trying to program/debug an STM32F446RE (Nucleo-F446RE target MCU) using a CMSIS-DAPv2 probe (DAP103 Bluepill CMSIS-DAP).
OpenOCD fails to connect over SWD.
Symptoms:
What works:
What fails:
OpenOCD version:
Command used (direct OpenOCD):
openocd -d4 -f interface/cmsis-dap.cfg -f target/stm32f4x.cfg -c "transport select swd; adapter speed 100; init; reset halt; exit"
Platform/OS:
Wiring:
Notes/questions:
1) Could ST-LINK be contending on SWD lines on Nucleo-F446RE when using an external probe? If yes, what’s the recommended way to disconnect ST-LINK from the target?
2) Any recommended OpenOCD settings for CMSIS-DAP (connect_under_reset/reset_config, lower speed, etc.)?
Full log (debug_level 4) attached below:
On the Nucleo board there are two jumpers, just above the crystal of the on-board ST-Link.
You need to remove them to isolate the SWD port of the ST-Link from the F446.
With the jumpers in place, the on-board ST-Link will prevent using the external CMSIS-DAP.
Please reply if this fixes the issue, so we can close the ticket
I have done still same issue :
I cannot see the connections in the pictures nor the pinout of the DAPLINK, but the removed jumpers are ok.
You need to connect the GND between the boards, for sure, and VDD 3.3V as you said required by your DAPLINK.
The SWDIO goes to PA13, that is on pin 13 of CN7
The SWCLK goes to PA14, that is on pin 15 of CN7
Probably you have simply swapped SWDIO and SWCLK.
Or, the firmware in the STM32F446 is blocking the SWD interface.
Without a NRST driven by the DAPLINK, you can try to keep pressed the black reset button of the Nucleo board, while starting OpenOCD. This would prevent the FW to start and to reprogram the SWD pins.