nRF Connect for desktop gives Device Protected

Hi,

I have nRF5340 nordic devlopment kit for devlopment.

I have programmed Heart Beat Monitoring Program using nRF Connect for Desktop Programmer (Windows 10).

Similarly i  programed BL5340 based module using nRF DK using given Port P20.

Connection - 

   DK                                BL5340 Module

1.VTG -                            3.1V

2.SWD IO -                     SWDIO 

3.SWD CLK -                  SWDCLK

4.RESET -                      RESET

5.GND DETECT -           GND

Now when again i tried to programme in similar way. IT SHOWS DEVICE PROTECTED. Press ERASE ALL to Remove from protection.

After ERASE ALL. It shows DEVICE CONNECTED. Upon Programming hex files. It again gives error NOT_AVAILABLE_BECAUSE_PROTECTION.

I am not understanding why does it gives error even though i haven't enabled any kind of code protection.

Please help how do i recover it.

Attached in log of nRF connect for desktop programmer.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2022-07-12T11:30:00.664Z INFO Using @nordicsemiconductor/nrf-device-lib-js to communicate with target via JLink
2022-07-12T11:30:00.665Z INFO JLink OB firmware version J-Link OB-nRF5340-NordicSemi compiled Dec 3 2021 15:46:49
2022-07-12T11:30:00.666Z DEBUG Sending usage data {"category":"pc-nrfconnect-programmer","action":"Open jlink OB version","label":"J-Link OB-nRF5340-NordicSemi compiled Dec 3 2021 15:46:49"}
2022-07-12T11:30:00.669Z INFO Device family NRF53
2022-07-12T11:30:00.670Z DEBUG Sending usage data {"category":"pc-nrfconnect-programmer","action":"Open jlink device family","label":"NRF53"}
2022-07-12T11:30:00.672Z INFO Device version NRF5340_xxAA_ENGD
2022-07-12T11:30:00.673Z DEBUG Sending usage data {"category":"pc-nrfconnect-programmer","action":"Open jlink device version","label":"NRF5340_xxAA_ENGD"}
2022-07-12T11:30:00.676Z INFO Board version PCA10095
2022-07-12T11:30:00.677Z DEBUG Sending usage data {"category":"pc-nrfconnect-programmer","action":"Open jlink device board version","label":"PCA10095"}
2022-07-12T11:30:00.679Z INFO Loading readback protection status for Application core
2022-07-12T11:30:00.680Z INFO Loading readback protection status for Network core
2022-07-12T11:30:00.681Z DEBUG Sending usage data {"category":"pc-nrfconnect-programmer","action":"Open device","label":"jlink"}
2022-07-12T11:30:01.749Z INFO Readback protection status: NRFDL_PROTECTION_STATUS_ALL
2022-07-12T11:30:02.091Z INFO Readback protection status: NRFDL_PROTECTION_STATUS_ALL
2022-07-12T11:30:02.103Z INFO Parse memory regions for Application core
2022-07-12T11:30:02.103Z INFO Parse memory regions for Network core
2022-07-12T11:30:02.109Z INFO Update files regions according to Application core
2022-07-12T11:30:02.109Z INFO Parse memory regions for file
2022-07-12T11:30:02.110Z INFO Update files regions according to Network core
2022-07-12T11:30:02.110Z INFO Parse memory regions for file
2022-07-12T11:30:02.123Z INFO Device is loaded and ready for further operation
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX