Good day, I am new to this forum so I am having some problems posting my question. Sorry for any inconveniences. 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 these errors when I try to flash using openocd after successful connection
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
I have seen a lot of suggestions on this site about disabling app_protect using:
But this does not work for me. I have also posted a question on stack overflow but I couldn't get much help.
https://stackoverflow.com/questions/52308978/problem-flashing-nrf52-chip-using-openocd
But now I got an original jlink. But with the jlink, I am not even able to connect to 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.