<?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>Debug port access port protection disabled after firmware wrote NRF_APPROTECT.DISABLE with 0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/124149/debug-port-access-port-protection-disabled-after-firmware-wrote-nrf_approtect-disable-with-0</link><description>I am trying to implemented a mechanism for authenticated debug on NRF52840 on NCS 2.5. 
 My understanding from the product specification is that DAP protection is enabled until both UICR.APPROTECT is 0x5A and NRF_APPROTECT.DISABLE is 0x5A. 
 I modified</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Sep 2025 16:10:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/124149/debug-port-access-port-protection-disabled-after-firmware-wrote-nrf_approtect-disable-with-0" /><item><title>RE: Debug port access port protection disabled after firmware wrote NRF_APPROTECT.DISABLE with 0</title><link>https://devzone.nordicsemi.com/thread/547794?ContentTypeID=1</link><pubDate>Thu, 04 Sep 2025 16:10:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2e090a7-3017-409d-a405-5eacd2571206</guid><dc:creator>Anthony Ambuehl</dc:creator><description>&lt;p&gt;Hi Einar,&amp;nbsp; I found that the mcuboot bootloader had CONFIG_NRF_APPROTECT_USE_UICR=y.&amp;nbsp; The nrfjprog tool was sending a reset and taking control while the mcuboot bootloader was initializing.&lt;/p&gt;
&lt;p&gt;After fixing mcuboot, its no longer an issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug port access port protection disabled after firmware wrote NRF_APPROTECT.DISABLE with 0</title><link>https://devzone.nordicsemi.com/thread/547782?ContentTypeID=1</link><pubDate>Thu, 04 Sep 2025 14:48:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b82123da-6d7d-455b-9196-fa64856b31d1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I do not see how AP Protect could be disabled with the sequence you copy-pasted from the command line. nrfjprog can disable AP protect by performing a recover operation (erase all), but that is intentional and is not shown here. Do you do something else to the device int he meantime that is not shown there?&lt;/p&gt;
&lt;p&gt;I suspect that a bootlaoder may be part of this. As you write, you write the magic&amp;nbsp;number 0x5A to diable AP protect to UICR-&amp;gt;APPROTECT. So if any fortware component at any later time also writes to&amp;nbsp;NRF_APPROTECT-&amp;gt;DISABLE &lt;em&gt;and&lt;/em&gt; there are no writes to&amp;nbsp;NRF_APPROTECT-&amp;gt;FORCEPROTECT, AP protect will be disabled.&lt;/p&gt;
&lt;p&gt;I would start by testing with the application and bootlaoder separately to see if only one is needed to open the debug interface, and then look closer there to see if you can find where&amp;nbsp;NRF_APPROTECT-&amp;gt;DISABLE is written to (if you for instance build the bootlaoder before and did not configure it to lock the debug interface, it will be opened by &lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/blob/2f5d4e5868ab573eac932fa4bc142565073c3c04/nrfx/mdk/system_nrf52_approtect.h#L55"&gt;this line&lt;/a&gt; in system_nrf52_approcet.h as &lt;span&gt;UICR-&amp;gt;&lt;/span&gt;&lt;span&gt;APPROTECT&lt;/span&gt; has the magic number even if you have modified it when you subsequently built the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>