Error: jtag status contains invalid mode value - communication failure
I believe I have a similar problem with my ST-Link v2 trying to connect a nRF52805.
I hope I am on the good forum for this question.
Actually I didn’t find a working OpenOCD forum.
https://forum.sparkfun.com/viewforum.php?f=18 seems to be down.
I hope I can find some assistance in this forum.
I have only four wires soldered: VCC, GND, SWDIO, SWCLK (no RST pin).
I am using OpenOCD on Windows.
I did connect many times to nRF51822 or nRF52832 MCUs and it always worked.
This time I am trying to reach a nRF52805, but I get these error messages similar to the ones in that forum thread (see below).
Will enabling “Software system reset” in reset config solve my issue?
How to enable this setting?
C:\Program Files (x86)\OpenOCD\bin>openocd -d2 -f interface/stlink.cfg -f target/nrf52.cfg
Open On-Chip Debugger 0.11.0 (2021-05-19) https://github.com/sysprogs/openocd
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select ‘.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
nRF52 device has a CTRL-AP dedicated to recover the device from AP lock.
A high level adapter (like a ST-Link) you are currently using cannot access
the CTRL-AP so ‘nrf52_recover’ command will not work.
Do not enable UICR APPROTECT.
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : STLINK V2J29S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.170928
Warn : target nrf52.cpu examination failed
Error: jtag status contains invalid mode value - communication failure
Polling target nrf52.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 100ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target nrf52.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 300ms
Info : starting gdb server for nrf52.cpu on 3333
Error: couldn’t bind gdb to socket on port 3333: No error
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target nrf52.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 700ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target nrf52.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 1500ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target nrf52.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 3100ms
shutdown command invoked