ElectronicCats / DAP-Cat-Programmer

An Open-Source CMSIS-DAP Debug Probe based on DAPLink and USB bus convert and it can realize USB convert to serial interface based in CH552, low-cost of $5 dollars
GNU Lesser General Public License v2.1
93 stars 29 forks source link

Trouble with openocd-v0.12.0 #6

Open 41exey opened 1 year ago

41exey commented 1 year ago

When I updated openocd to 0.12 I'm to face a problem:

Open On-Chip Debugger 0.12.0 (2023-01-14-23:37)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Error: CMSIS-DAP command mismatch. Sent 0x0 received 0x3
Error: CMSIS-DAP command CMD_INFO failed.

In 0.11 version it wasn't:

Open On-Chip Debugger 0.11.0 (2021-03-07-12:52)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: FW Version = 1.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 2000 kHz

Any ideas?

Eric286 commented 1 year ago

Hello @41exey!

The error message suggests that there is a command mismatch between the CMSIS-DAP interface and OpenOCD 0.12.0. One possible solution is to try changing the session transport from SWD to JTAG by using the transport select jtag command.

Could you do this and tell me if a change was presented please.

Best Regards!

Support Team

41exey commented 1 year ago

try changing the session transport from SWD to JTAG by using the transport select jtag command.

I changed transport to jtag but same error. Nothing has changed.

Eric286 commented 1 year ago

Hello @41exey !

It seems like there may be an issue with the compatibility between the version of OpenOCD being used (0.12) and the CMSIS-DAP protocol on the device.

In the meantim, I suggest continuing to use version 11 of OpenOCD, However, I will put the bug tag in the issue to check it and see the root of the problem.

Thank you for bringing this to our attention.

Good Day!