<?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>Unable to flash firmware(Using VsCode) due to APProtect (NRF9151)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114916/unable-to-flash-firmware-using-vscode-due-to-approtect-nrf9151</link><description>The environment setup I&amp;#39;m using is VsCode with the NRF extension. I&amp;#39;m using SDK v2.6.1. When flashing bootloader firmware to my device I get this output on my vs code terminal. 
 It looks like the readback protection of the NRF9151 is preventing me from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Oct 2024 12:51:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114916/unable-to-flash-firmware-using-vscode-due-to-approtect-nrf9151" /><item><title>RE: Unable to flash firmware(Using VsCode) due to APProtect (NRF9151)</title><link>https://devzone.nordicsemi.com/thread/504696?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2024 12:51:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1744803-d040-48f5-b770-26a221095360</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Ethan,&lt;br /&gt;&lt;br /&gt;Thank you for the update.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to flash firmware(Using VsCode) due to APProtect (NRF9151)</title><link>https://devzone.nordicsemi.com/thread/504612?ContentTypeID=1</link><pubDate>Wed, 02 Oct 2024 07:06:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91263eed-b090-41bf-9ada-8025c7b2e5f5</guid><dc:creator>EthanKeet</dc:creator><description>&lt;p&gt;Hi Dejans,&lt;br /&gt;&lt;br /&gt;Sorry for the delay. I have replaced the NRF9151 on my board and all is working as it should be. I assume that I accidently bricked the MCU on the previous chip. You can go ahead and close this thread. Thanks for all your time and help.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Ethan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to flash firmware(Using VsCode) due to APProtect (NRF9151)</title><link>https://devzone.nordicsemi.com/thread/503791?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2024 14:08:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea89cb1c-eb4a-43bd-ac44-c16ace2794a0</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Does this problem appear only on one of your custom boards? Have you tried any other of your boards?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to flash firmware(Using VsCode) due to APProtect (NRF9151)</title><link>https://devzone.nordicsemi.com/thread/503663?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2024 05:54:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f35c11d8-7ad8-44e8-8539-c4e1a987ab36</guid><dc:creator>EthanKeet</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;It is a custom board. Unfortunately, I can&amp;#39;t share the specific board due it being proprietary. If board information is necessary I can open a private ticket?&lt;br /&gt;&lt;br /&gt;Flashing firmware worked initially, I was flashing bootloader firmware and test firmware with no issues. After re - flashing a few times I wasn&amp;#39;t able to flash firmware anymore because&amp;nbsp;of the issues stated in the post.&lt;br /&gt;&lt;br /&gt;In the bootloader, the following values were written to the hardware registers:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;volatile UINT32* pSecureApProtectDisable = (volatile UINT32 * ) 0x50039E00;
    volatile UINT32* pNonSecureApProtectDisable = (volatile UINT32 * ) 0x50039E10;
    *pSecureApProtectDisable = 0x5A;
    *pNonSecureApProtectDisable = 0x5A;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I saw in the datasheet for the NRF9151, that writing to those two register entries is necessary to disable the APProtection on the NRF.&lt;br /&gt;&lt;br /&gt;I was not able to write to those registers using JLink commander afterwards as I was unable to connect to the device.&lt;br /&gt;&lt;br /&gt;I suspect that it could be a hardware issue. I might have damaged the NRF during testing. It just seems odd that the debug output I am getting from the device mentions ap protection being the cause of not being able to perform a nrfjprog --recover or nrfjprog --eraseall.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to flash firmware(Using VsCode) due to APProtect (NRF9151)</title><link>https://devzone.nordicsemi.com/thread/503444?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2024 15:59:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:338e8440-ec8e-4fb9-ba46-1042332632b0</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Which board do you use?&lt;br /&gt;&lt;br /&gt;Did flashing work fine&amp;nbsp;prior to flashing bootloader firmware to your device?&lt;/p&gt;
[quote user=""]I&amp;#39;ve also tried to use JLink commander to manually write to the hardware registers but I can&amp;#39;t connect to the device because the DAP won&amp;#39;t power up.[/quote]
&lt;p&gt;Which hardware registers did you try to write to and which values?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>