<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>About device recovery and disabling protection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120025/about-device-recovery-and-disabling-protection</link><description>Hello. 
 I started using a custom board with the nRF5340. After flashing the program, it seems that protection was enabled, and operations such as erase, read, and write became impossible. Recovery also failed. 
 
 Is the recovery procedure correct? The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 31 Mar 2025 03:30:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120025/about-device-recovery-and-disabling-protection" /><item><title>RE: About device recovery and disabling protection</title><link>https://devzone.nordicsemi.com/thread/529672?ContentTypeID=1</link><pubDate>Mon, 31 Mar 2025 03:30:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7965fdb-0220-439b-8149-7099a7938196</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;Hi Charlie,&lt;/p&gt;
&lt;p&gt;I have created a private ticket, so I will close this ticket for now.&lt;/p&gt;
&lt;p&gt;Thank you for your support.&lt;/p&gt;
&lt;p&gt;a.da&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About device recovery and disabling protection</title><link>https://devzone.nordicsemi.com/thread/529544?ContentTypeID=1</link><pubDate>Fri, 28 Mar 2025 13:46:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:256f8600-daf4-4e69-8962-68d33b6e5722</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi a.da,&lt;/p&gt;
&lt;p&gt;Yes, I think so.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you or your colleague request any hardware reveiw for this custom board before?&lt;/p&gt;
&lt;p&gt;If not you can generate a private ticket for this free service. We can help on both schematic and pcb desig reveiw. Please also mention this issue on in the ticket.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About device recovery and disabling protection</title><link>https://devzone.nordicsemi.com/thread/529181?ContentTypeID=1</link><pubDate>Thu, 27 Mar 2025 01:26:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d356997-f302-4d71-a2e8-f0f9115fe019</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Charlie,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Once again, I would like to express my gratitude for your cooperation.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="93921" url="~/f/nordic-q-a/120025/about-device-recovery-and-disabling-protection/529085"]1. Run the above commands on an nRF5340DK with&amp;nbsp;&lt;span&gt;J-Link OB&amp;nbsp;debugger on it.&lt;/span&gt;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;PS C:\workspace&amp;gt; nrfutil device list
**********48
Product         J-Link
Board version   PCA10095
Ports           COM14, vcom: 0
                COM13, vcom: 1
Traits          devkit, usb, serialPorts, jlink, seggerUsb

Supported devices found: 1

PS C:\workspace&amp;gt; nrfutil device protection-get
serial_number: **********48
        core: Application
        access status: Debug access is enabled (status value: None)&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="93921" url="~/f/nordic-q-a/120025/about-device-recovery-and-disabling-protection/529085"]2. &lt;span&gt;nRF5340DK can program and debug external custom boards.&amp;nbsp;&lt;/span&gt;Run the above commands using&amp;nbsp;&lt;span&gt;J-Link OB&lt;/span&gt;&lt;span&gt;&amp;nbsp;debugger on nRF5340DK connecting with your custom board.&lt;/span&gt;[/quote]
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;PS C:\workspace&amp;gt; nrfutil device list
**********48
Product         J-Link
Board version   PCA10095
Ports           COM14, vcom: 0
                COM13, vcom: 1
Traits          jlink, usb, seggerUsb, serialPorts, devkit

Supported devices found: 1

PS C:\workspace&amp;gt; nrfutil device protection-get
Error: One or more get protection status for tasks failed:
 * **********48: [Probe] Device error: Failed to write DebugPort register 0x08: Unknown Error in J-Link DLL (error code =-1) (Generic)&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="93921" url="~/f/nordic-q-a/120025/about-device-recovery-and-disabling-protection/529085"]3. Try using your standalone J-Link debugger to run the above commands on the nRF5340 on an nRF5340DK.[/quote]
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;PS C:\workspace&amp;gt; nrfutil device list
**********69
Product         J-Link
Ports           COM6
Traits          serialPorts, jlink, usb, seggerUsb

Supported devices found: 1

PS C:\workspace&amp;gt; nrfutil device protection-get
serial_number: **********69
        core: Application
        access status: Debug access is enabled (status value: None)&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is it correct that the standalone debugger and OB debugger are working fine, but there is an issue with the custom board?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;a.da&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About device recovery and disabling protection</title><link>https://devzone.nordicsemi.com/thread/529085?ContentTypeID=1</link><pubDate>Wed, 26 Mar 2025 14:00:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00629f3d-5835-420a-af7a-b16d504ba1bf</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;The nRF5340DK has an onboard J-Link OB debugger, which supports programming and debugging external custom boards. It works same as a standalone J-Link debugger.&lt;/p&gt;
&lt;p&gt;Could you cross-check with the following combinations? These steps can help identify whether the issue is software or hardware-related:&lt;/p&gt;
&lt;p&gt;1. Run the above commands on an nRF5340DK with&amp;nbsp;&lt;span&gt;J-Link OB&amp;nbsp;debugger on it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;2. &lt;span&gt;nRF5340DK can program and debug external custom boards.&amp;nbsp;&lt;/span&gt;Run the above commands using&amp;nbsp;&lt;span&gt;J-Link OB&lt;/span&gt;&lt;span&gt;&amp;nbsp;debugger on nRF5340DK connecting with your custom board.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;3. Try using your standalone J-Link debugger to run the above commands on the nRF5340 on an nRF5340DK.&lt;/p&gt;
&lt;p&gt;Let me know what you find.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About device recovery and disabling protection</title><link>https://devzone.nordicsemi.com/thread/528953?ContentTypeID=1</link><pubDate>Wed, 26 Mar 2025 04:46:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b40b1f5d-852d-4d31-be60-3e6e65258a70</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;Hi Charlie,&lt;/p&gt;
[quote userid="93921" url="~/f/nordic-q-a/120025/about-device-recovery-and-disabling-protection/528642"]Cloud you explain more about how&amp;nbsp;and which&amp;nbsp;&lt;span&gt;protection was enabled?&lt;/span&gt;[/quote]
&lt;p&gt;I apologize for the unclear explanation.&lt;br /&gt;The fact that some kind of protection was enabled is just my assumption.&lt;br /&gt;First, I need to check the current state of the board.&lt;/p&gt;
[quote userid="138526" url="~/f/nordic-q-a/120025/about-device-recovery-and-disabling-protection"]After flashing the program, it seems that protection was enabled, and operations such as erase, read, and write became impossible.[/quote]
&lt;p&gt;&lt;/p&gt;
[quote userid="93921" url="~/f/nordic-q-a/120025/about-device-recovery-and-disabling-protection/528642"]If it is&amp;nbsp;APPROTECT, the device can be lock and unlock with following commands&amp;nbsp;using nrfutil:[/quote]
&lt;p&gt;Thank you for providing the specific commands.&lt;br /&gt;However, unfortunately, failed to execute protection-get.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;PS C:\workspace&amp;gt; nrfutil device list
*********
Product         J-Link
Ports           COM6
Traits          jlink, usb, seggerUsb, serialPorts

PS C:\workspace&amp;gt; nrfutil device protection-get
Error: One or more get protection status for tasks failed:
 * *********: [Probe] Device error: Failed to write DebugPort register 0x08: Unknown Error in J-Link DLL (error code =-1) (Generic)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Failed to execute recover.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;PS C:\workspace&amp;gt; nrfutil device recover --core Network
x Failed to recover *********, [Probe] Device error: Failed to write DebugPort register 0x08: Unknown Error in J-Link DLL (error code =-1)
Error: One or more recover tasks failed:
 * *********: [Probe] Device error: Failed to write DebugPort register 0x08: Unknown Error in J-Link DLL (error code =-1) (Generic)

PS C:\workspace&amp;gt; nrfutil device recover               
x Failed to recover *********, [Probe] Device error: Failed to write DebugPort register 0x08: Unknown Error in J-Link DLL (error code =-1)
Error: One or more recover tasks failed:
 * *********: [Probe] Device error: Failed to write DebugPort register 0x08: Unknown Error in J-Link DLL (error code =-1) (Generic)&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please let me know if there are any other ways to obtain clues.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;a.da&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About device recovery and disabling protection</title><link>https://devzone.nordicsemi.com/thread/528642?ContentTypeID=1</link><pubDate>Mon, 24 Mar 2025 13:57:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6f7b387-b988-468c-9cbb-20de8ae6183a</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Cloud you explain more about how&amp;nbsp;and which&amp;nbsp;&lt;span&gt;protection was enabled?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If it is&amp;nbsp;APPROTECT, the device can be lock and unlock with following commands&amp;nbsp;using nrfutil:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:\WINDOWS\system32&amp;gt;nrfutil device list
1050053588
product         J-Link
board version   PCA10095
ports           COM9, vcom: 0
                COM10, vcom: 1
traits          devkit, jlink, seggerUsb, serialPorts, usb

id:9
ports           COM1, vcom: 0
                COM3, vcom: 1
traits          serialPorts

Found 2 supported device(s)


C:\WINDOWS\system32&amp;gt;nrfutil device protection-get
serial_number: 001050053588
         core: Application
         readback protection: No memory regions protected (None)

Error: Failed to get protection status for one or more devices:
 * id:9: No matching plugin found for operations to execute, code: UnsupportedDevice

C:\WINDOWS\system32&amp;gt;nrfutil device protection-set All --core network
error: invalid value &amp;#39;network&amp;#39; for &amp;#39;--core &amp;lt;CORE&amp;gt;&amp;#39;
  [possible values: Application, Modem, Network, Secure]

  tip: a similar value exists: &amp;#39;Network&amp;#39;

For more information, try &amp;#39;--help&amp;#39;.

C:\WINDOWS\system32&amp;gt;nrfutil device protection-set All --core Network
v Protection was set on 1050053588

C:\WINDOWS\system32&amp;gt;nrfutil device protection-set All
v Protection was set on 1050053588

C:\WINDOWS\system32&amp;gt;nrfutil device protection-get
serial_number: 001050053588
         core: Application
         readback protection: All memory regions protected (All)

Error: Failed to get protection status for one or more devices:
 * id:9: No matching plugin found for operations to execute, code: UnsupportedDevice

C:\WINDOWS\system32&amp;gt;nrfutil device recover --core Network
v Recovered 1050053588

C:\WINDOWS\system32&amp;gt;nrfutil device recover
v Recovered 1050053588

C:\WINDOWS\system32&amp;gt;nrfutil device protection-get
serial_number: 001050053588
         core: Application
         readback protection: No memory regions protected (None)

Error: Failed to get protection status for one or more devices:
 * id:9: No matching plugin found for operations to execute, code: UnsupportedDevice

C:\WINDOWS\system32&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/nan_042/page/APP/nan_production_programming/device_protection.html"&gt;Enabling device protection&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/nrfutil/page/nrfutil-device/guides/programming_recovery.html"&gt;Recovering the device&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/security/ap_protect.html#enabling_hardware_ap-protect_by_locking_the_uicrapprotect_register"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/security/ap_protect.html#enabling_hardware_ap-protect_by_locking_the_uicrapprotect_register&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About device recovery and disabling protection</title><link>https://devzone.nordicsemi.com/thread/528519?ContentTypeID=1</link><pubDate>Mon, 24 Mar 2025 03:18:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36ca7720-26b5-457b-9b87-dc3396115a48</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;Hi Charlie, thanks for your reply.&lt;/p&gt;
[quote userid="93921" url="~/f/nordic-q-a/120025/about-device-recovery-and-disabling-protection/528441"]You can try reading the register values to check which type of protection is enabled and determine how to disable it.[/quote]
&lt;p&gt;I am unable to connect to the device via J-Link Commander, so I can&amp;#39;t even read the registers.&lt;br /&gt;I was able to connect before flashing, but after flashing, I can no longer do so.&lt;br /&gt;Is there anything else I can do?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;SEGGER J-Link Commander V8.22 (Compiled Mar 19 2025 15:48:32)
DLL version V8.22, compiled Mar 19 2025 15:47:39

Connecting to J-Link via USB...O.K.
Firmware: J-Link V12 compiled Feb 20 2025 16:24:27
Hardware version: V12.00
J-Link uptime (since boot): 0d 00h 01m 02s
S/N: *********
License(s): GDB
USB speed mode: High speed (480 MBit/s)
VTref=3.337V


Type &amp;quot;connect&amp;quot; to establish a target connection, &amp;#39;?&amp;#39; for help
J-Link&amp;gt;connect
Please specify device / core. &amp;lt;Default&amp;gt;: NRF5340_XXAA_APP
Type &amp;#39;?&amp;#39; for selection dialog
Device&amp;gt;
Please specify target interface:
  J) JTAG (Default)
  S) SWD
  T) cJTAG
TIF&amp;gt;s
Specify target interface speed [kHz]. &amp;lt;Default&amp;gt;: 4000 kHz
Speed&amp;gt;
Device &amp;quot;NRF5340_XXAA_APP&amp;quot; selected.


Connecting to target via SWD
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 23us
InitTarget() start
InitTarget() end - Took 102ms
Failed to attach to CPU. Trying connect under reset.
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 11us
InitTarget() start
InitTarget() end - Took 3.59ms
Error occurred: Could not connect to the target device.
For troubleshooting steps visit: https://wiki.segger.com/J-Link_Troubleshooting
J-Link&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;a.da&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About device recovery and disabling protection</title><link>https://devzone.nordicsemi.com/thread/528441?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2025 15:25:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d148e7dc-6c90-4856-a3da-e2d804d971a7</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/nan_042/page/APP/nan_production_programming/intro.html"&gt;nRF5340 Production Programming&lt;/a&gt;&amp;nbsp;guide describes how to enable and disable protection.&lt;/p&gt;
&lt;p&gt;You can try reading the register values to check which type of protection is enabled and determine how to disable it.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt; Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About device recovery and disabling protection</title><link>https://devzone.nordicsemi.com/thread/528326?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2025 07:57:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f03ab610-3a4a-4d23-871f-4da5273466cd</guid><dc:creator>a.da</dc:creator><description>&lt;p&gt;&lt;span&gt;Additional Note:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Before flashing, I was able to read via J-Flash or Programmer.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>