Cannot program PCB - The write access failed, but no cause could be determined.

Hi there,

I am currently trying to program a custom PCB equipped with the BMD-380 that has the nrf52480 inside. Sadly, I am now stuck for days with the same issue: It simply will not write anything to memory.

For creating my board definition files I mostly relied on the existing files for the BMD-380. As we will only use some specific parts the .dts is only a reduced version of the one from from the BMD-380:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include <nordic/nrf52840_partition.dtsi>
#include "sensor_station_nrf52840-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "Custom u-blox BMD-380";
compatible = "u-blox,sensor_station_nrf52840";
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
leds {
compatible = "gpio-leds";
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The other files are pretty much kept as they are apart from changing the pins in the pinctrl.dtsi

The next step was to have a simple blinky (or even empty) application and try to flash it to the chip with a J-Tag connection. The VSCode extension detects the debugger and the chip. Nevertheless running
$ nrfjprog --program /home/thomas/Documents/vac/test/blinky/build/merged.hex --recover --verify -f NRF52 --snr 801045345
will return the following:

[ #################### ]   0.646s | Erase file - Done erasing                                                          
[error] [ Client] - Encountered error -102: Command program_file executed for 422 milliseconds with result -102        
[error] [  nRF52] - The write access failed, but no cause could be determined.
[error] [  nRF52] - It may be due to an unaligned access, accessing a nonexistent memory, or a communication issue.
[error] [  nRF52] - Failed while performing 'Write' operation on target address 0x00000000.
-102: An unknown error.
[error] [  nRF52] - Failed while reading device information.
[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.

I also made the sure APPROTECT is not active by running $ nrfjprog --recover --family NRF52.
I also read the status with $ nrfjprog --readregs --snr 801045345 which returns 0xFFFFFFFF.
Here is the logfile after trying to program:
721252.log.log

Sadly, I am out of ideas what to try or where the error might be. Does someone had a similar issue and might want to share the experience with it?

Thank you very much in advance.

Best Regards
Thomas