<?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>nRF52833 (Custom Board) halts when JLink is connected</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92226/nrf52833-custom-board-halts-when-jlink-is-connected</link><description>Update: 
 Turns out it was an issue with the readback protection. We have a temporary fix of calling the following function at boot. 
 Is there a way to configure this in Kconfig or Devicetree? 
 
 Original Post: 
 Hello! 
 We have just received a new</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 23 Sep 2022 15:30:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92226/nrf52833-custom-board-halts-when-jlink-is-connected" /><item><title>RE: nRF52833 (Custom Board) halts when JLink is connected</title><link>https://devzone.nordicsemi.com/thread/387727?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2022 15:30:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:386212cd-48ed-4a08-9b6d-898935703338</guid><dc:creator>ArchieA_C</dc:creator><description>&lt;p&gt;That fixed it. Updated to 10.17.3 (looks like it was fixed in 10.15.4). Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 (Custom Board) halts when JLink is connected</title><link>https://devzone.nordicsemi.com/thread/387685?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2022 12:04:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69ddebac-246b-410d-839b-429f6b3b263a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Please check if your nrfjprog installation is up to date. Older version will not recognize this new chip revision.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 (Custom Board) halts when JLink is connected</title><link>https://devzone.nordicsemi.com/thread/387680?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2022 11:47:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68eacce6-3bed-49e6-b8a0-93f2f52b24b5</guid><dc:creator>ArchieA_C</dc:creator><description>&lt;p&gt;Something isn&amp;#39;t working correctly for me. When I run the following commands:&lt;br /&gt;nrfjprog --program build/zephyr/zephyr.hex --recover --verify -f NRF52 --snr 821006534&lt;/p&gt;
&lt;p&gt;nrfjprog --run&lt;/p&gt;
&lt;p&gt;nrfjprog --memrd 0x10001208&lt;br /&gt;&lt;br /&gt;I get a readback protection error unless I include the code in my original post. It seems that the nrf startup code isn&amp;#39;t disabling the soft readback protection.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 (Custom Board) halts when JLink is connected</title><link>https://devzone.nordicsemi.com/thread/387659?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2022 10:44:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba4bb756-01a9-4199-a88c-c896fcb21998</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, correct. What&amp;#39;s important to note is that Jlink commander (jlink.exe on Windows) will erase the chip through the CTRL-AP when it disables the readback protection, but not set the UICR.APPROTECT register to disable it permanently like nrfjprog --recover does. This means the readback protection will become re-enabled again as soon as you perform a power or pin reset.&lt;/p&gt;
&lt;p&gt;You can run the following command to check if UICR.APPROTECT is set to UICR_APPROTECT_PALL_HwDisabled:&lt;/p&gt;
&lt;p&gt;$ nrfjprog --memrd 0x10001208&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 (Custom Board) halts when JLink is connected</title><link>https://devzone.nordicsemi.com/thread/387655?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2022 10:36:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68f1dc28-3d2c-477b-9bdd-b100984f6f59</guid><dc:creator>ArchieA_C</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thank you for the reply. Are you saying that as long as you recover the device once, it will no longer have readback protection? If this is the case, it does not line up with what we are seeing. Without the code detailed in the above post, readback protection is reenabled each time we power cycle the device. I have checked and&amp;nbsp;ENABLE_APPROTECT has not been defined.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 (Custom Board) halts when JLink is connected</title><link>https://devzone.nordicsemi.com/thread/387603?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2022 06:31:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44d3778e-2e32-4de4-8be2-1e5e49537381</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It seems like you have received the new revision of the nRF52833 (&lt;a href="https://infocenter.nordicsemi.com/topic/comp_matrix_nrf52833/COMP/nrf52833/nRF52833_ic_revision_overview.html"&gt; rev.2 build code Bx0&lt;/a&gt;) which comes with a hardened approtect mechanism. With this revision you must write 0x5A (UICR_APPROTECT_PALL_HwDisabled) to 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&amp;nbsp;&lt;/a&gt;&lt;/span&gt; &lt;span&gt;to make the debug interface stay open across resets (i.e. pin reset, power or brownout reset, watchdog reset, or wake from System OFF). &lt;/span&gt;Please refer to the &lt;span&gt;&lt;a title="IN149 Informational Notice v1.1" href="https://infocenter.nordicsemi.com/pdf/in_149_v1.1.pdf?cp=4_1_2_3"&gt;IN149 Informational Notice v1.1&lt;/a&gt; for a more detailed summary of the changes.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user=""]Is there a way to configure this in Kconfig or Devicetree?&amp;nbsp;[/quote]
&lt;p&gt;The SDK does not include code to set the UICR.&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 at runtime. Instead we recommend to run &amp;quot;nrfjprog --recover&amp;quot; when you receive a new board.&amp;nbsp; The --recover command will erase the flash through the &lt;a title="CTRL-AP - Control access port" href="https://infocenter.nordicsemi.com/topic/ps_nrf52833/dif.html?cp=4_1_0_3_7_2#unique_1629221857"&gt;CTRL-AP - Control access port&lt;/a&gt; and set 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;&lt;/span&gt;= 0x5a.&lt;/p&gt;
&lt;p&gt;Your startup code will load the 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;&lt;/span&gt; into the volatile&amp;nbsp; NRF_APPROTECT-&amp;gt;&lt;span&gt;DISABLE to prevent readback protection from enabling itself after a reset here: &lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/f5a9b04bacdd46cf6206f5813cd7e078ce5d553e/mdk/system_nrf52_approtect.h#L55"&gt;https://github.com/NordicSemiconductor/nrfx/blob/f5a9b04bacdd46cf6206f5813cd7e078ce5d553e/mdk/system_nrf52_approtect.h#L55&lt;/a&gt; &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;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>