Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

nRF52-DK "Failed to connect to target" and "Access protection is enabled, can't read device version"

Hello Nordic developers,

Last week, I got a new nRF52-DK development board from Mouser Electronics UK. I could use this board for a while with SEGGER Embedded Studio for ARM 5.68 and nRF5_SDK_17.1.0_ddde560. I could run "blinky" and other examples from the SDK successfully. Also a program I wrote was successfully programmed in the chip. A day later, I could not program the chip anymore. SEGGER showed the following screen:

After a click "Yes" I got the same screen again:

Then SEGGER showed the following screen:

I read in this forum that this is related to some new "Access Protection" feature and that to disable I should recover the board using nrfjprog. This is what I did as you can see in the following commands:

Fullscreen
1
2
3
> nrfjprog --version
nrfjprog version: 10.14.0 external
JLinkARM.dll version: 7.56b
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
> nrfjprog --recover --family NRF52 --log
Recovering device. This operation might take 30s.
ERROR: [ nRF52] - Access protection is enabled, can't read device version.
ERROR: [ nRF52] - Failed to write UICR after recovering.
ERROR: Recover failed. Please make sure that the correct device family is given
ERROR: and try again.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

As a result, it looks like I cannot recover the chip because Access protection is enabled. The logs generated by nrfjprog are the following:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[2023-Feb-21 13:24:26] [ info] --------------------------------------------------------------------------------
[2023-Feb-21 13:24:26] [ info] nrfjprog --recover --family NRF52 --log
[2023-Feb-21 13:24:26] [ info] nrfjprog version 10.14.0 external
[2023-Feb-21 13:24:26] [ info] --------------------------------------------------------------------------------
[2023-Feb-21 13:24:26] [ info] Load library at /opt/nrf-command-line-tools/lib/libnrfjprogdll.so.
[2023-Feb-21 13:24:26] [ info] Library loaded, loading member functions.
[2023-Feb-21 13:24:26] [ info] Member functions succesfully loaded.
[2023-Feb-21 13:24:26] [debug] [ Client] - open
[2023-Feb-21 13:24:26] [debug] [ Client] - start
[2023-Feb-21 13:24:26] [ info] [ Client] - stdout: Jlinkarm nRF Worker ready. Handling sequence ef6619eb-0374-4e27-963e-8131679c07f5.
[2023-Feb-21 13:24:26] [trace] [ Client] - Command open executed for 6 milliseconds with result 0
[2023-Feb-21 13:24:26] [debug] [ Client] - enum_emu_snr
[2023-Feb-21 13:24:26] [debug] [SeggerBackend] - Logger sink registered in Segger backend logger
[2023-Feb-21 13:24:26] [debug] [ JLink] - Logger sink registered in JLink logger
[2023-Feb-21 13:24:26] [debug] [ nRF52] - open
[2023-Feb-21 13:24:26] [debug] [SeggerBackend] - open_dll
[2023-Feb-21 13:24:26] [debug] [SeggerBackend] - No J-Link DLL path was provided. Attempting to auto detect.
[2023-Feb-21 13:24:26] [ info] [SeggerBackend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so.
[2023-Feb-21 13:24:26] [ info] [SeggerBackend] - Library loaded, loading member functions.
[2023-Feb-21 13:24:26] [ info] [SeggerBackend] - Member functions succesfully loaded.
[2023-Feb-21 13:24:26] [debug] [SeggerBackend] - dll_version
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Also I tried to "Erase" the chip using nrfConnect's Programmer as you can see in the following screenshots with no success.

After clicking "Erase All"  I get the following log:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2023-02-21T13:32:20.529Z DEBUG Application data folder: /home/suso/.config/nrfconnect/pc-nrfconnect-programmer
2023-02-21T13:32:20.623Z DEBUG App pc-nrfconnect-programmer v3.0.6 local
2023-02-21T13:32:20.623Z DEBUG App path: /home/suso/.nrfconnect-apps/node_modules/pc-nrfconnect-programmer
2023-02-21T13:32:20.623Z DEBUG nRFConnect 4.0.0, required by the app is (>=4.0.0)
2023-02-21T13:32:20.623Z DEBUG nRFConnect path: /tmp/.mount_nrfcon8Blgte/resources/app.asar
2023-02-21T13:32:20.623Z DEBUG HomeDir: /home/suso
2023-02-21T13:32:20.624Z DEBUG TmpDir: /tmp
2023-02-21T13:32:20.805Z INFO Using nrf-device-lib-js version: 0.5.0
2023-02-21T13:32:20.805Z INFO Using nrf-device-lib version: 0.13.11
2023-02-21T13:32:20.806Z INFO Using nrfjprog DLL version: 10.18.2
2023-02-21T13:32:20.806Z INFO Using JLink version: JLink_V7.56b
2023-02-21T13:32:20.844Z INFO Installed JLink version does not match the provided version (V7.66a)
2023-02-21T13:32:24.342Z INFO Using @nordicsemiconductor/nrf-device-lib-js to communicate with target via JLink
2023-02-21T13:32:24.343Z INFO JLink OB firmware version J-Link OB-nRF5340-NordicSemi compiled Jul 2 2021 10:55:25
2023-02-21T13:32:24.343Z INFO Device family NRF52_FAMILY
2023-02-21T13:32:24.343Z INFO Device version NRF51xxx_xxAA_REV1
2023-02-21T13:32:24.343Z INFO Board version PCA10040
2023-02-21T13:32:24.343Z INFO Loading readback protection status for Application core
2023-02-21T13:32:25.479Z INFO Readback protection status: NRFDL_PROTECTION_STATUS_ALL
2023-02-21T13:32:25.485Z INFO Parse memory regions for Application core
2023-02-21T13:32:25.491Z INFO Update files regions according to Application core
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I know that the nrf52832 chip is working correctly because it is currently executing the last program I flashed. This program sends data via the UART port and I can read it correctly from my computer. The issue is that I cannot program the board again due to the Access Protection issue.

This is the image of the board:

Do you have an idea how I can "resurrect" this board so I program software again?