cancel
Showing results for 
Search instead for 
Did you mean: 

Open ocd SWD Programming with CMSIS-DAP

Quentin_27
Associate II

Hi everyone,

iIm currently trying to program an STM32F0x MCU with an CMSIS-DAP interface on openocd, but i'm currently able to generate only an useless reset signal :

In Yellow the SDIO and in Purple the RST

Quentin_27_0-1741856714617.png

So when i'm trying to generate this reset signal, I get this situation on openOCD:

 

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6625888173D2D2D
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : Connecting under reset
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Error: BUG: can't assert SRST
Info : SWD DPIDR 0x0bb11477
Info : [stm32f0x.cpu] Cortex-M0 r0p0 processor detected
Info : [stm32f0x.cpu] target has 4 breakpoints, 2 watchpoints
Info : [stm32f0x.cpu] Examination succeed
Info : [stm32f0x.cpu] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections
Error: [stm32f0x.cpu] Polling failed, trying to reexamine
Error: Error connecting DP: cannot read IDR
Error: [stm32f0x.cpu] Examination failed
Error: [stm32f0x.cpu] Examination failed, GDB will be halted. Polling again in 100ms
Error: [stm32f0x.cpu] Polling failed, trying to reexamine
Error: Error connecting DP: cannot read IDR
Error: [stm32f0x.cpu] Examination failed
Error: [stm32f0x.cpu] Examination failed, GDB will be halted. Polling again in 300ms
Error: [stm32f0x.cpu] Polling failed, trying to reexamine
Error: Error connecting DP: cannot read IDR
Error: [stm32f0x.cpu] Examination failed
Error: [stm32f0x.cpu] Examination failed, GDB will be halted. Polling again in 700ms
Error: [stm32f0x.cpu] Polling failed, trying to reexamine
Error: Error connecting DP: cannot read IDR
Error: [stm32f0x.cpu] Examination failed
Error: [stm32f0x.cpu] Examination failed, GDB will be halted. Polling again in 1500ms
shutdown command invoked

I think my connection is okay, but break after a moment.

My controller have been programmed once with this method (only GND SDIO SCLK) but without nRST signal, I have added them because i can't halt the MCU with software reset to reprogram them ...

Is ST-link use an special reset feature that i haven't see ? or maybe my configuration is incorrect:

openocd -f interface/cmsis-dap.cfg -f target/stm32f0x.cfg -c "reset_config connect_assert_srst"

 

Thanks for reading !

have a good day.

1 REPLY 1
Johnjohn
Visitor

Hello 

How to control speed of a.c. motor