<?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>How to remove the nRF9160&amp;#39;s erase protection.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93169/how-to-remove-the-nrf9160-s-erase-protection</link><description>Hello everyone, 
 I&amp;#39;m working on a project with nRF9160 and I used to this code to test the erase protection. But I found that the value of the &amp;quot;ERASEPROTECT-&amp;gt;DISABLE&amp;quot; register does not match. 
 
 
 
 Command to build this code: 
 
 
 My result on UART</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Nov 2023 14:55:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93169/how-to-remove-the-nrf9160-s-erase-protection" /><item><title>RE: How to remove the nRF9160's erase protection.</title><link>https://devzone.nordicsemi.com/thread/458153?ContentTypeID=1</link><pubDate>Wed, 29 Nov 2023 14:55:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be3cb370-4f93-49df-91a0-b8693632cec0</guid><dc:creator>Dinesh Kumar K</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/w.wiyarun"&gt;wasan&lt;/a&gt;&amp;nbsp;&lt;br /&gt;The issue was solved, I made a mistake by putting ERASEPROTECT.LOCK enable state and setting key to ERASEPROTECT.DISABLE.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;        while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy);
        if (NRF_UICR_S-&amp;gt;ERASEPROTECT != UICR_ERASEPROTECT_PALL_Unprotected)
        {
                NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.LOCK = (uint32_t)0x00000001;
        }

        while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy);
        if (NRF_UICR_S-&amp;gt;ERASEPROTECT != UICR_ERASEPROTECT_PALL_Unprotected)
        {
            NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.DISABLE = key;
        }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Doing this locked out the device before setting the erase protect key. which in turn makes the device unrecoverable. it was clearly discussed here &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/100614/request-for-guidance-and-documentation-on-eraseprotect-approtect-secureapprotect"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/100614/request-for-guidance-and-documentation-on-eraseprotect-approtect-secureapprotect&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove the nRF9160's erase protection.</title><link>https://devzone.nordicsemi.com/thread/454949?ContentTypeID=1</link><pubDate>Thu, 09 Nov 2023 14:36:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc9d1820-1f7f-4acf-a2eb-4775ffc73c6e</guid><dc:creator>wasan</dc:creator><description>&lt;p&gt;Could you provide output message when you run command scrip?&lt;/p&gt;
&lt;p&gt;Sorry for reply late.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove the nRF9160's erase protection.</title><link>https://devzone.nordicsemi.com/thread/432973?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2023 12:41:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c27c2dbf-4cb5-4e3e-9dc9-c718d0c05a80</guid><dc:creator>Dinesh Kumar K</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/w.wiyarun"&gt;wasan&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;br /&gt;I read through the Q&amp;amp;A as I wanted to test the working of ERASEPROTECT and disable it using the Jlink script you have provided, I think I am also not able to disable erase protection.&amp;nbsp;&lt;strong&gt;&lt;span style="background-color:#ffffff;"&gt;nrfjprog --recover &lt;/span&gt;&lt;/strong&gt;&lt;span style="background-color:#ffffff;"&gt;is also not helping.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*
 * Copyright (c) 2012-2014 Wind River Systems, Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include &amp;lt;zephyr.h&amp;gt;

void main(void)
{
        const uint32_t key = 0xDEADBEEF;

        NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Wen;

        while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy);
        NRF_UICR-&amp;gt;APPROTECT = 0x00000000;

        while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy);
        NRF_UICR-&amp;gt;ERASEPROTECT = 0x00000000;

        while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy);
        NRF_UICR-&amp;gt;SECUREAPPROTECT = 0x00000000;

        while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy);
        NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Ren;

        while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy);
        if (NRF_UICR_S-&amp;gt;ERASEPROTECT != UICR_ERASEPROTECT_PALL_Unprotected)
        {
                NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.LOCK = (uint32_t)0x00000001;
        }

        while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy);
        if (NRF_UICR_S-&amp;gt;ERASEPROTECT != UICR_ERASEPROTECT_PALL_Unprotected)
        {
            NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.DISABLE = key;
        }

        printk(&amp;quot;Before Write Key.\n&amp;quot;);
        printk(&amp;quot;ERASEPROTECT     Addr    0x%p\n&amp;quot;, &amp;amp;NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.LOCK);
        printk(&amp;quot;ERASEPROTECT          0x%X\n&amp;quot;,  NRF_UICR-&amp;gt;ERASEPROTECT);
        printk(&amp;quot;ERASEPROTECT.LOCK    0x%X\n&amp;quot;,   NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.LOCK);
        printk(&amp;quot;ERASEPROTECT.DISABLE 0x%X\n&amp;quot;,   NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.DISABLE);
        uint32_t count = 0;

        k_msleep(1000);

        while (count &amp;lt; 10)
        {
                k_msleep(1000);
                printk(&amp;quot;Count:: %u\r\n&amp;quot;, count++);
        }

}
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;output:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build zephyr-v2.3.0-22164-gb121d671c44c  ***                                                                     
Before Write Key.                                                                                                                      
ERASEPROTECT     Addr    0x0x50006500                                                                                                  
ERASEPROTECT          0x0                                                                                                              
ERASEPROTECT.LOCK    0x1                                                                                                               
ERASEPROTECT.DISABLE 0x0                                                                                                               
Count:: 0                                                                                                                              
Count:: 1                                                                                                                              
Count:: 2                                                                                                                              
Count:: 3                                                                                                                              
Count:: 4                                                                                                                              
Count:: 5                                                                                                                              
Count:: 6                                                                                                                              
Count:: 7                                                                                                                              
Count:: 8                                                                                                                              
Count:: 9&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;jlink script:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;USB 960093400
SWDSelect
SWDWriteDP 1 0x50000000  
SWDWriteDP 2 0x04000010
SWDWriteAP 3 0xDEADBEEF

sleep 10000
SWDWriteDP 1 0x50000000
SWDWriteDP 2 0x04000000
SWDWriteAP 0 0x00000001
SWDReadAP 0
SWDReadAP 0
sleep 5000
SWDWriteAP 0 0x00000000
SWDReadAP 0
SWDReadAP 0
sleep 1000

exit&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Help needed.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Dinesh Kumar K&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove the nRF9160's erase protection.</title><link>https://devzone.nordicsemi.com/thread/399108?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2022 08:45:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0a49fee-3c76-4915-98f8-e59cac43e753</guid><dc:creator>wasan</dc:creator><description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I remove some line in my code as below.&amp;nbsp;My device is working.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Test base on:&lt;/p&gt;
&lt;p&gt;SDK 2.1.2&lt;/p&gt;
&lt;p&gt;MCU nRF9160&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/*
 * Copyright (c) 2012-2014 Wind River Systems, Inc.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include &amp;lt;zephyr.h&amp;gt;
#include &amp;lt;drivers/gpio.h&amp;gt;

#define GPIO_DEV     gpio0 /**&amp;lt; The gpio blank name. */
#define BUTTON_A_PIN 12    /**&amp;lt; Pin number of factory button. */
#define BUTTON_B_PIN 18    /**&amp;lt; Pin number of factory button. */

static const struct device *gpio_dev;

void main(void)
{
    const uint32_t key = 0xDEADBEEF;

    gpio_dev = DEVICE_DT_GET(DT_NODELABEL(GPIO_DEV));
    if (gpio_dev == NULL)
    {
        LOG_ERR(&amp;quot;Could not get GPIO Module.&amp;quot;);
        return -EIO;
    }

    gpio_pin_configure(gpio_dev, BUTTON_A_PIN, GPIO_INPUT);
    gpio_pin_configure(gpio_dev, BUTTON_B_PIN, GPIO_INPUT);

    NRF_NVMC-&amp;gt;CONFIG = ( (NVMC_CONFIG_WEN_Wen  ) &amp;lt;&amp;lt; NVMC_CONFIG_WEN_Pos);
    while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy)
    { }

    NRF_UICR-&amp;gt;APPROTECT = 0x00000000;
    while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy)
    { }

    NRF_UICR-&amp;gt;ERASEPROTECT = 0x00000000;
    while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy)
    { }

    NRF_UICR-&amp;gt;SECUREAPPROTECT = 0x00000000;
    while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy)
    { }


    NRF_NVMC-&amp;gt;CONFIG = ( (NVMC_CONFIG_WEN_Ren  ) &amp;lt;&amp;lt; NVMC_CONFIG_WEN_Pos);
    while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy)
    { }

    /**
     * @brief When unuse unlock feature in this boot.
     *
     */
    // NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.LOCK = 0x00000001;
    // while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy)
    // { }

    printk(&amp;quot;Before Write Key.\n&amp;quot;);
    printk(&amp;quot;ERASEPROTECT     Addr	 0x%X\n&amp;quot;, &amp;amp;NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.LOCK);
    printk(&amp;quot;ERASEPROTECT          0x%X\n&amp;quot;,  NRF_UICR-&amp;gt;ERASEPROTECT);
    printk(&amp;quot;ERASEPROTECT.LOCK    0x%X\n&amp;quot;,   NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.LOCK);
    printk(&amp;quot;ERASEPROTECT.DISABLE 0x%X\n&amp;quot;,   NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.DISABLE);
    uint32_t count = 0;

    k_msleep(1000);
    while (1)
    {
        if (0 == gpio_pin_get(gpio_dev, BUTTON_A_PIN))
        {
            k_msleep(100);
            if (0 == gpio_pin_get(gpio_dev, BUTTON_A_PIN))
            {
                printk(&amp;quot;Unlock with Key A:0x%x\r\n&amp;quot;, count++);

                NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.DISABLE = 0xDEADBEEF;
                while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy)
                { }

                while (0 == gpio_pin_get(gpio_dev, BUTTON_A_PIN))
                {
                    k_msleep(1);
                }
            }
        }


        if (0 == gpio_pin_get(gpio_dev, BUTTON_B_PIN))
        {
            k_msleep(100);
            if (0 == gpio_pin_get(gpio_dev, BUTTON_B_PIN))
            {
                printk(&amp;quot;Unlock with Key B:0x%x\r\n&amp;quot;, count++);

                NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.DISABLE = 0x00000000;
                while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy)
                { }

                while (0 == gpio_pin_get(gpio_dev, BUTTON_B_PIN))
                {
                    k_msleep(1);
                }
            }
        }

        k_msleep(1);
    }
} /* main */
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Command to build this code:&lt;/p&gt;
&lt;div class="content-scrollable-wrapper"&gt;
&lt;div class="evolution-code-editor theme-clouds"&gt;&lt;a class="fullscreen" href="https://devzone.nordicsemi.com/f/nordic-q-a/93169/how-to-remove-the-nrf9160-s-erase-protection"&gt;&lt;/a&gt;
&lt;div class=" ace_editor ace-clouds"&gt;
&lt;div class="ace_gutter"&gt;
&lt;div class="ace_layer ace_gutter-layer ace_folding-enabled"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ace_scroller"&gt;
&lt;div class="ace_content"&gt;
&lt;div class="ace_layer ace_text-layer"&gt;
&lt;div class="ace_line"&gt;&lt;pre class="ui-code" data-mode="powershell"&gt;$ west build -b nrf9160dk_nrf9160 .&lt;/pre&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;span&gt;Scrip file &amp;gt; setPassword.jlink&lt;/span&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;pre class="ui-code" data-mode="text"&gt;SWDSelect
SWDWriteDP 1 0x50000000  
SWDWriteDP 2 0x04000010  
SWDWriteAP 3 0xDEADBEEF

sleep 10000
SWDWriteDP 1 0x50000000  
SWDWriteDP 2 0x04000000  
SWDWriteAP 0 0x00000001
SWDReadAP 0
SWDReadAP 0
sleep 5000
SWDWriteAP 0 0x00000000
SWDReadAP 0
SWDReadAP 0
sleep 1000

exit

&lt;/pre&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;span&gt;Command to run script&lt;/span&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="powershell"&gt;$ JLinkExe -Commandfile setPassword.jlink &lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;Noted:&lt;/div&gt;
&lt;div class="ace_line"&gt;1. The device can&amp;#39;t&amp;nbsp; disable erase protection when set the register&amp;nbsp;&lt;span&gt;NRF_CTRL_AP_PERI_S&lt;/span&gt;&lt;span&gt;-&amp;gt;ERASEPROTECT.DISABLE = &lt;/span&gt;&lt;span&gt;0x00000000&lt;/span&gt;&lt;span&gt;;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;2. Please use the &amp;quot;nrfjprog --recover&amp;quot; command to test the nRF91&amp;#39;s erase protection that has been disabled.&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;&lt;/div&gt;
&lt;div class="ace_line"&gt;Best regards&lt;/div&gt;
&lt;div class="ace_line"&gt;Wasan&lt;/div&gt;
&lt;/div&gt;
&lt;div class="ace_layer ace_marker-layer"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove the nRF9160's erase protection.</title><link>https://devzone.nordicsemi.com/thread/395610?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2022 15:31:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5777365c-023a-490d-a7b6-40b0cd1de84c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Looking at the whitepaper again,&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/nan_041/APP/nan_production_programming/device_protection.html"&gt;https://infocenter.nordicsemi.com/topic/nan_041/APP/nan_production_programming/device_protection.html&lt;/a&gt;&amp;nbsp;, the order does not seem to matter, but, you need to&amp;nbsp;&lt;span&gt;wait to reset until all the protections are set.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove the nRF9160's erase protection.</title><link>https://devzone.nordicsemi.com/thread/394820?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2022 02:57:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ffad4a6-295c-41b3-98c9-afb93e8e0e74</guid><dc:creator>wasan</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Thank you for your information.&lt;/p&gt;
&lt;p&gt;Do you know about how to config&amp;nbsp;NRF_CTRL_AP_PERI_S-&amp;gt;ERASEPROTECT.DISABLE?&lt;br /&gt;&lt;br /&gt;When can I put the value to &lt;span&gt;ERASEPROTECT.DISABLE&amp;nbsp;&lt;/span&gt;before or after enalbe&amp;nbsp;APPROTECT and&amp;nbsp;&amp;nbsp;ERASEPROTECT?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove the nRF9160's erase protection.</title><link>https://devzone.nordicsemi.com/thread/393851?ContentTypeID=1</link><pubDate>Thu, 03 Nov 2022 12:11:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d576b5f-62fb-4d7c-be33-5f6545bd6ab0</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m still doing some testing on this. We have this pynrfjprog script, originally developed for nRF53 by one of my colleagues, that looks like it can be used. In the script change &amp;quot;NRF53&amp;quot; and ap-id to 4, and it should in theory work.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1667477356216v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Link to the pynrfjprog script:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/blob/main/ctrl-ap/eraseprotect/scripts/disable_eraseprotect.py"&gt;https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/blob/main/ctrl-ap/eraseprotect/scripts/disable_eraseprotect.py&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to remove the nRF9160's erase protection.</title><link>https://devzone.nordicsemi.com/thread/392959?ContentTypeID=1</link><pubDate>Fri, 28 Oct 2022 08:44:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab31378e-f6d4-4f0e-9598-44d6e1224492</guid><dc:creator>wasan</dc:creator><description>&lt;p&gt;&lt;span&gt;1) So nrfjprog --recover is not working?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes. It is not working.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[tdc@localhost script]$ nrfjprog --recover&lt;br /&gt;Recovering device. This operation might take 30s.&lt;br /&gt;ERROR: Recover failed. Please make sure that the correct device family is given&lt;br /&gt;ERROR: and try again.&lt;br /&gt;NOTE: For additional output, try running again with logging enabled (--log).&lt;br /&gt;NOTE: Any generated log error messages will be displayed.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2) What is&amp;nbsp;APPROTECT.STATUS register (0x00C) of the CTRL-AP returning? See&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/nan_041/APP/nan_production_programming/check_approtect_enabled.html"&gt;this page&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;APPROTECT = Enable&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;SECUREAPPROTECT = Disable&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;My result.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="powershell"&gt;Select SWD by sending SWD switching sequence.
Found SWD-DP with ID 0x6BA02477
J-Link&amp;gt;SWDWriteDP 1 0x50000000
Write DP register 1 = 0x50000000
J-Link&amp;gt;SWDWriteDP 2 0x04000000
Write DP register 2 = 0x04000000
J-Link&amp;gt;SWDReadAP 3
Read AP register 3 = 0x00000000
J-Link&amp;gt;SWDReadAP 3
Read AP register 3 = 0x00000002
J-Link&amp;gt;exit

Script processing completed.

&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&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: How to remove the nRF9160's erase protection.</title><link>https://devzone.nordicsemi.com/thread/392896?ContentTypeID=1</link><pubDate>Thu, 27 Oct 2022 15:21:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ebbdc84-c7af-48f2-b5a4-1cc438980858</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]setPassword.txt[/quote]
&lt;p&gt;The script looks correct.&lt;/p&gt;
[quote user=""]&lt;p&gt;I found my board can&amp;#39;t disable erase protection and I can&amp;#39;t recover it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;1) So nrfjprog --recover is not working?&lt;/p&gt;
&lt;p&gt;2) What is&amp;nbsp;&lt;span&gt;APPROTECT.STATUS register (0x00C) of the CTRL-AP returning? See &lt;a href="https://infocenter.nordicsemi.com/topic/nan_041/APP/nan_production_programming/check_approtect_enabled.html"&gt;this page&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>