sandeepmistry / arduino-nRF5

Arduino Core for Nordic Semiconductor nRF5 based boards
Other
872 stars 278 forks source link

Error: jtag status contains invalid mode value - communication failure #506

Open dejavu1987 opened 1 year ago

dejavu1987 commented 1 year ago

I am trying to program an nRF52810 (A door key, which I am seeing if can be reprogrammed) using STLink v2 clone. when trying to upload a blink sketch, selecting Generic NRF52 as board, I see following error. Could it mean that it is read out protected? can debug_level: 0 be changed for more info?

Sketch uses 2100 bytes (0%) of program storage space. Maximum is 409600 bytes.
Open On-Chip Debugger 0.10.0-dev-gdc53227 (2016-04-09-13:45)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
0x4000
adapter speed: 10000 kHz
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
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
in procedure 'program' 
in procedure 'reset' called at file "embedded:startup.tcl", line 478
in procedure 'ocd_bouncer'

embedded:startup.tcl:454: Error: ** Unable to reset target **
in procedure 'program' 
in procedure 'program_error' called at file "embedded:startup.tcl", line 479
at file "embedded:startup.tcl", line 454
Failed programming: uploading error: exit status 1

In addition I tried adding a jumper cable on RST pin of STLink and connected to RST pad on the board but did not get any different result. More details here https://electronics.stackexchange.com/questions/660256/repurposing-nrf52810-based-ibecon-click-device

samlbakr commented 9 months ago

Were you ever able to program the nRF52810 with this library? I was able to get my code to upload and verify but there is no output on my board.