<?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>Debugging on nRF52833 with IAR when using DFU and APPPROTECT</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93364/debugging-on-nrf52833-with-iar-when-using-dfu-and-appprotect</link><description>Hi, 
 I&amp;#39;m developing on the current setup: 
 
 nRF52833 DK, emulating an nRF52820. 
 Soft Device 113 version 7.2.0 
 SDK 17.1.0 
 IAR EW ARM 9.30 
 
 I&amp;#39;m trying to include the secure bootloader code into our project based on the example &amp;quot; \examples\dfu</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Nov 2022 14:55:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93364/debugging-on-nrf52833-with-iar-when-using-dfu-and-appprotect" /><item><title>RE: Debugging on nRF52833 with IAR when using DFU and APPPROTECT</title><link>https://devzone.nordicsemi.com/thread/398159?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2022 14:55:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58a74b63-f27c-4a41-b9b7-bcf18b2f6176</guid><dc:creator>Federico</dc:creator><description>&lt;p&gt;Thanks! This worked great&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debugging on nRF52833 with IAR when using DFU and APPPROTECT</title><link>https://devzone.nordicsemi.com/thread/393199?ContentTypeID=1</link><pubDate>Mon, 31 Oct 2022 10:44:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8817daa5-c55a-4572-a6fb-6e6c07a42f64</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The AP protection is supposed to be disabled on startup here: &lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/v1.9.0/mdk/system_nrf52_approtect.h#L53"&gt;https://github.com/NordicSemiconductor/nrfx/blob/v1.9.0/mdk/system_nrf52_approtect.h#L53&lt;/a&gt;. However, due to an unfortunate bug in the MDK version (v8.40.3) bundled with nRF5 SDK 17.1.0, the&amp;nbsp;nrf52_errata_249() function&amp;nbsp; ends up returning false even when it is run on&amp;nbsp; nrf52833 rev.2 with the hardened approtect mechanism (&lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52833_Rev2/ERR/nRF52833/Rev2/latest/config_833_249.html?cp=4_1_1_0_3_0"&gt;[249] DIF: Access port protection needs software interface configuration&lt;/a&gt;&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;This issue was addressed in MDK version 8.44.2 (&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-MDK"&gt;https://www.nordicsemi.com/Products/Development-tools/nRF-MDK&lt;/a&gt; ):&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/pastedimage1667211863405v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;So, the fix for this is to download MDK version 8.44.2 or later (&lt;a href="https://www.nordicsemi.com/-/media/Software-and-other-downloads/Desktop-software/nRF-MDK/sw/8-51-0/nRF_MDK_8_51_0_GCC_NordicLicense.zip"&gt;https://www.nordicsemi.com/-/media/Software-and-other-downloads/Desktop-software/nRF-MDK/sw/8-51-0/nRF_MDK_8_51_0_GCC_NordicLicense.zip&lt;/a&gt;) and replace the files in nRF5_SDK_17.1.0_ddde560/modules/nrfx/mdk with the ones you downloaded and rebuild the application/bootloader.&lt;/p&gt;
&lt;p&gt;Before flashing the board for the first time, you should also run &amp;quot;nrfjprog --recover&amp;quot;. This will write 0x5A&amp;nbsp; to the non-volatile UICR.&lt;span&gt;&lt;a title="APPROTECT" href="https://infocenter.nordicsemi.com/topic/ps_nrf52833/uicr.html?cp=4_1_0_3_4_0_4#register.APPROTECT"&gt;APPROTECT&lt;/a&gt; register so the readback protection stays disabled across resets.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>