<?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>nRF5340: Access protected, MCUboot can not confirm new image</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120621/nrf5340-access-protected-mcuboot-can-not-confirm-new-image</link><description>Hi Support Team, 
 I met a conflict situation. Could you help give me some guidance? 
 The project is based on nrf5340 and ncs V2.5.2. The device supports BLE FOTA and works well now. But after I enable the Access port protection in UICR and reboot, the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Apr 2025 16:17:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120621/nrf5340-access-protected-mcuboot-can-not-confirm-new-image" /><item><title>RE: nRF5340: Access protected, MCUboot can not confirm new image</title><link>https://devzone.nordicsemi.com/thread/531888?ContentTypeID=1</link><pubDate>Tue, 15 Apr 2025 16:17:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd62fb50-59b2-493b-a70c-5c0309d98fab</guid><dc:creator>Yanpengwu</dc:creator><description>&lt;p&gt;Yes, I agree this is the root cause of the behaviour.&lt;br /&gt;I clicked the &amp;quot;Remember selected action&amp;quot; before, so the RTT viewer unsecures the device without a reminder when&amp;nbsp;connecting it.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thank you very much:).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340: Access protected, MCUboot can not confirm new image</title><link>https://devzone.nordicsemi.com/thread/531879?ContentTypeID=1</link><pubDate>Tue, 15 Apr 2025 15:38:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4188ece-5411-4104-a64c-672176f49d5c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;It seems you might click &amp;quot;yes&amp;quot; to&amp;nbsp;&lt;span&gt;unsecure the device while&amp;nbsp;using Jlink RTT Viewer to connect the nRF5340DK with&amp;nbsp;Access Protection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1744729770979v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then, the SWD would &lt;/span&gt;execute a similar nrfjprog&amp;#39;s recover operation to &lt;span&gt;erase the DK. So the LED will not blink after that. If you execute &amp;quot;nrfjprog --reset&amp;quot; at the moment, it would show&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1744730980133v6.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I select &amp;quot;No&amp;quot; to not&lt;span&gt;&amp;nbsp;unsecure the device, and I can see the LED is blinking even though Jlink RTT Viewer could not connect to the target.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340: Access protected, MCUboot can not confirm new image</title><link>https://devzone.nordicsemi.com/thread/531787?ContentTypeID=1</link><pubDate>Tue, 15 Apr 2025 06:45:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33076553-41c8-48cd-9015-fab0bc4e435c</guid><dc:creator>Yanpengwu</dc:creator><description>&lt;p&gt;I&amp;#39;m using a custom board now, I will try it on the nRF5340DK later.&lt;/p&gt;
&lt;p&gt;Yes, what I saw had nothing to do with MCUBoot, which worked properly, and a new image can be swapped. The trigger of the fault state is accessing the debug port after enabling AP-protect.&lt;/p&gt;
&lt;p&gt;I believe the below steps can reproduce it on nRF5340DK:&lt;br /&gt;1 Run peripheral_lbs on nRF5340DK, can see the led work and debug trace output. &lt;br /&gt;2 Enable Access Protection: nrfjprog.exe --memwr 0x00FF8000 --val 0x00000000 --family NRF53 --force&lt;br /&gt;3 Reconnect the debugger port (I&amp;#39;m using Jlink RTT Viewer, I think it is the same for other terminals, just try to access the debugger port), then the led will stop and the device bricked, even a reset is not helpful unless to recover the device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340: Access protected, MCUboot can not confirm new image</title><link>https://devzone.nordicsemi.com/thread/531736?ContentTypeID=1</link><pubDate>Mon, 14 Apr 2025 15:15:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:910798f2-dce1-434f-afec-93ff31686e43</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you using the custom board or nRF5340DK? Is it possible for you to reproduce the issue on nRF5340DK?&lt;/p&gt;
&lt;p&gt;I use NCS v2.5.2&amp;nbsp;peripheral_lbs with&amp;nbsp;CONFIG_BOOTLOADER_MCUBOOT and CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU enabled to build and flash, then&amp;nbsp;&lt;span&gt;enable Access Protection:&amp;nbsp;&lt;/span&gt;&lt;span&gt;nrfjprog.exe --memwr 0x00FF8000 --val 0x00000000 --family NRF53 --force, and it can update to the new image without issue. It will reset the DK if accessing the register under&amp;nbsp;the AP-protect. The error log is expected because the&amp;nbsp;Access protection is enabled.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you test with&amp;nbsp;NCS v2.5.2&amp;nbsp;peripheral_lbs with&amp;nbsp;CONFIG_BOOTLOADER_MCUBOOT and CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU enabled?&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1744643570077v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340: Access protected, MCUboot can not confirm new image</title><link>https://devzone.nordicsemi.com/thread/531630?ContentTypeID=1</link><pubDate>Mon, 14 Apr 2025 06:57:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbd46c78-b9ef-4f68-887c-e70f4c5de7f9</guid><dc:creator>Yanpengwu</dc:creator><description>&lt;p&gt;Thanks for the documentation. I did not set any AP-protect in conf, so I believe the default&amp;nbsp;CONFIG_NRF_APPROTECT_USE_UICR=y was used in my project.&lt;br /&gt;&lt;br /&gt;I found the cause of the strange behaviours above is that after enabling the AP-protect, any access to the&amp;nbsp; SWD port will hang up the MCU(it seems nrf5340 in a fault state), and the device becomes a brick unless to recover it. Reset is useless in this situation. That&amp;#39;s why I saw the applications died early or late after&amp;nbsp;&lt;span&gt;enabling the AP-protect.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Is this a designed behavior of nrf5340 or a fault state? I did not find any description in the document. Could you help clarify this? Thank you very much.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340: Access protected, MCUboot can not confirm new image</title><link>https://devzone.nordicsemi.com/thread/531573?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 20:12:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb1e0dcd-decb-4fc6-8249-bc4aee47f183</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;See the&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.5.2/page/nrf/security/ap_protect.html"&gt;Enabling access port protection mechanism&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340: Access protected, MCUboot can not confirm new image</title><link>https://devzone.nordicsemi.com/thread/531519?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 12:11:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a2920cf-a62b-421e-a27a-93d892b3715d</guid><dc:creator>Yanpengwu</dc:creator><description>&lt;p&gt;I&amp;#39;m using ncs V2.5.2, how to set Access protection in the application code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340: Access protected, MCUboot can not confirm new image</title><link>https://devzone.nordicsemi.com/thread/531507?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 11:14:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bae57c10-feb5-4ed4-ab0c-bbbb313c9de2</guid><dc:creator>Yanpengwu</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;I agree that the Access port protection only applies to debugger/SWD access. But what I see is very strange.&lt;/p&gt;
&lt;p&gt;Maybe the error was not caused by MCUboot. I simplified the test as: &lt;br /&gt;(1) Removed all logic in my applicaiton, just keep a led flash and debug trace to see if the application is alive.&lt;br /&gt;(2) MCUboot enabled, but not do the upgrade, just compile and flash in VS code through JLink.&lt;/p&gt;
&lt;p&gt;The result:&lt;br /&gt;(1) Flash the application. It works well, I can see the led flash and log trace.&lt;br /&gt;(2) Run the below code in Power Shell to enable Access Protection:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nrfjprog.exe --memwr 0x00FF8000 --val 0x00000000 --family NRF53 --force&lt;br /&gt;(3) I can see a pause on LED flash and log trace, after about 20 to 30 seconds, it resumes as normal.&lt;br /&gt;(4) I reset the device and let Access protect take effect. At this moment, the behavior is very strange: I can see the led flash for 10 seconds, then it stops and the application dies.&lt;br /&gt; After the reset, no log trace, this is the expected behavior of access protection enabled.&lt;br /&gt; &lt;br /&gt;Is it correct to enable the access protection in the above way? Why is the behaviour so strange?&lt;br /&gt;Thank you very much.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Yanpeng Wu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340: Access protected, MCUboot can not confirm new image</title><link>https://devzone.nordicsemi.com/thread/531418?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 16:32:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92b52b69-2bf0-4e3f-937b-f8fbb1588d65</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Access port protection should do nothing at all, it just means that a debugger cannot access the flash, the internal access of flash should always work the same.&lt;/span&gt;&lt;/p&gt;
[quote user="Yanpengwu"]Without FOTA and Enable access protect, the MCUboot should be able to run the application, but seems the system will hangs on&amp;nbsp;the calling of&amp;nbsp;&lt;span&gt;boot_write_img_confirmed()&lt;/span&gt;[/quote]
&lt;p&gt;You can refer to this&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v2.5.2/samples/cellular/smp_svr"&gt;https://github.com/nrfconnect/sdk-nrf/tree/v2.5.2/samples/cellular/smp_svr&lt;/a&gt;. Add&amp;nbsp;CONFIG_UART_CONSOLE=n to&amp;nbsp;&amp;nbsp;child_image/mcuboot.conf, and the sample can run on the nRF5340DK.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;br /&gt;Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340: Access protected, MCUboot can not confirm new image</title><link>https://devzone.nordicsemi.com/thread/531305?ContentTypeID=1</link><pubDate>Thu, 10 Apr 2025 09:30:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:110c3b0e-4f07-42e9-9266-d08e592c3107</guid><dc:creator>Yanpengwu</dc:creator><description>&lt;p&gt;&amp;nbsp;At the beginning of application main(), there is&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;rc&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;boot_write_img_confirmed&lt;/span&gt;&lt;span&gt;();&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Without FOTA and Enable access protect, the MCUboot should be able to run the application, but seems the system will hangs on&amp;nbsp;the calling of&amp;nbsp;&lt;span&gt;boot_write_img_confirmed()&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>