Custom nRF5340 board application core access protection

I am working with a custom PCB using an nRF5340 (integrated in the Fanstel BT40F module) and both a J-Link base device and the nRF5340DK as a debugger/programmer (i.e. I have attempted using both devices). I am able to flash firmware to a new device successfully the first time after running the 

nrfjprog --recover
 command, but any attempts beyond this yield a variety of access protection errors that can't be undone by either a rerun of the recover command or attempting to erase all memory. I have outlined my programming process for both the J-Link and DK below:

J-Link Debugger:

The device is connected using serial wire debug through a tag connect header to my debugger. Upon initial setup I first open jlink commander and connect the device using the connect command and the built in nRF5340 application core option. This runs successfully initially. I then go into VS Code with the nRF connect extension (as well as the toolchain and all other requirements installed). I can build and flash the code from our companies firmware team once successfully after running the first erase all/recover command, but any subsequent attempts result in the following error when flashing:

and the following error when attempting to manually run the --recover command:

DK Programming:

I first connect the tag connect header to the 10pin header P19 on my V2 development kit. The device is recognized successfully and I can attempt to flash. I then receive these same errors when attempting to program through the development kit as well. Any guidance on how to bypass the access protection beyond the steps I have already tried would be much appreciated.

Related