We had three nRF52840DK boards (PCA10056) for several years for use in development. Then one died (or to be fair, I killed it), so we got two more that turned out to be newer.
I've got both the nRF Command Line Tools (e.g., nrfjprog) and nrfutil. I understand nrfjprog is slated for obsolescence, so I'd like to switch to nrfutil, except that nrfutil does not yet support writing (and reading) to flash blocks or UICR addresses, and I must have that. So nrfjprog is still the go-to tool.
What I'm seeing is that I can reliably program both old and new DKs with either tool.
Now, I'm using these DKs as programmers for the target hardware. The target has a Tag-Connect footprint, and I'm using a 6-inch TC2030-CTX-NL cable.
The old DK works flawlessly, every time. The new DK does not.
Furthermore, when I have the programming cable connected (to DEBUG_OUT, P19) and just hanging (a transmission-line stub?), the old DK will respond to commands but the new one never does.
So, with the cable hanging there, the new DK gets the following errors:
D:\home\dormand\>nrfjprog -f NRF52 --program project.hex --verify --chiperase --pinreset
[error] [ Client] - Encountered error -102: Command read_device_info executed for 140 milliseconds with result -102
[error] [ Worker] - An unknown error.
[error] [ Client] - Encountered error -102: Command read_memory_descriptors executed for 30 milliseconds with result -102
Failed to read device memories.
[error] [ Worker] - An unknown 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.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.
D:\home\dormand>nrfutil device program --firmware project.hex --options verify=VERIFY_READ,reset=RESET_PIN
[00:00:00] ------ 0% [1050227132] Failed, [jlink] JLINKARM_DLL_ERROR
Error: One or more program tasks failed:
* 1050227132: [jlink] JLINKARM_DLL_ERROR, code: Nrfjlink
More info - taking the stub programming cable off the new board (it won't respond to _anything_ with the cable present),
D:\home\dormand>nrfutil device device-info
serial_number: 000683450546
boardVersion: PCA10056
deviceFamily: NRF52_FAMILY
deviceVersion: NRF52840_xxAA_REV2
jlinkObFirmwareVersion: J-Link OB-SAM3U128-V2-NordicSemi compiled Jun 25 2024 17:06:37
protectionStatus: NRFDL_PROTECTION_STATUS_NONE
serial_number: 001050227132
boardVersion: PCA10056
deviceFamily: NRF52_FAMILY
deviceVersion: NRF52840_xxAA_REV3
jlinkObFirmwareVersion: J-Link OB-nRF5340-NordicSemi compiled Oct 30 2023 12:13:06
protectionStatus: NRFDL_PROTECTION_STATUS_NONE
Error: Failed to device info one or more devices:
* id:8: No matching plugin found for operations to execute, code: UnsupportedDevice
I see both the device version is different and the JLink firmware is _Very_ different. Very surprised to see anything "nrf5340" on a nRF52840DK board.
I believe I've seen the means on the DevZone for replacing the firmware, but I am reluctant to do so, since without the cable the board _does_ in fact program and _sometimes_ can succeed in programming a target. This seems to be more of a hardware problem, if merely the presence of a 6-inch stub on P19 prevents the JLink from doiong _anything_.
My other newer DK behaves the same exact way.
D:\home\dormand>nrfutil device device-info
serial_number: 001050268011
boardVersion: PCA10056
deviceFamily: NRF52_FAMILY
deviceVersion: NRF52840_xxAA_REV3
jlinkObFirmwareVersion: J-Link OB-nRF5340-NordicSemi compiled Oct 30 2023 12:13:06
protectionStatus: NRFDL_PROTECTION_STATUS_NONE
Error: Failed to device info one or more devices:
* id:7: No matching plugin found for operations to execute, code: UnsupportedDevice