Good day, I am having serious problems flashing my custom NRF5282 board. I started with Openocd, using the st-link v2 debugger and I was able to connect to the device and view memory as well as read registers, but I am unable to program the chip using openocd. I get this error:
JTAG failure -4 JTAG failure -4 JTAG failure -4 JTAG failure -4 JTAG failure -4 JTAG failure -4 target halted due to debug-request, current mode: Thread xPSR: 00000000 pc: 00000000 msp: 00000000 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 Previous state query failed, trying to reconnect jtag status contains invalid mode value - communication failure Polling target nrf52.cpu failed, trying to reexamine
I have seen a lot of suggestions on this site about disabling app_protect using:
dap apreg 1 0x04 0x01
But this does not work for me. I have also posted a question on stack overflow but I couldnt get much help. stackoverflow.com/.../problem-flashing-nrf52-chip-using-openocd
But now I got an original jlink. But with the jlink I am not even able to connect ot the board. I get this error:
J-Link>connect
Device "NRF52832_XXAA" selected.
Connecting to target via SWD
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x02880000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read AHB ROM register
AP[1]: Skipped. Not an AHB-AP
****** Error: DAP error while reading DP-Ctrl-Stat register.
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x02880000)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read AHB ROM register
AP[1]: Skipped. Not an AHB-AP
Cannot connect to target.
J-Link>
I have also tried the nrfjprog command line tools but I get this error:
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.
I think my connection is good because I am able to connect to the device via openocd and stlink-v2, But I am not using the reset pin.
My device voltage is also 4.8v. Please can anyone help me with any suggestions? Thanks for your anticipated cooperation