<?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>NRF52 RBP (Readback protection) unexpected behavior</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30946/nrf52-rbp-readback-protection-unexpected-behavior</link><description>We are currently going in production with NRF52 and we are facing the following issue with RBP on NRF52832QFAAB0. 
 Basically looks like the processor enters an unknown state when RBP command is issued to it. 
 Here are the steps I take to reproduce the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Mar 2018 14:38:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30946/nrf52-rbp-readback-protection-unexpected-behavior" /><item><title>RE: NRF52 RBP (Readback protection) unexpected behavior</title><link>https://devzone.nordicsemi.com/thread/125194?ContentTypeID=1</link><pubDate>Tue, 20 Mar 2018 14:38:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50d78084-957f-4488-8218-da0266905a99</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi Farhang,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for this bug report. I see the same behavior as you describe. This is not the intended behavior and it have been reported internally. I will let you know when a new version with a fix have been released.&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;Sigurd&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 RBP (Readback protection) unexpected behavior</title><link>https://devzone.nordicsemi.com/thread/122662?ContentTypeID=1</link><pubDate>Fri, 02 Mar 2018 17:56:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f00831cb-97e2-483e-b6b3-fde46586541e</guid><dc:creator>Farhang</dc:creator><description>&lt;p&gt;It is permanently halted.&lt;/p&gt;
&lt;p&gt;So you&amp;#39;re saying that &amp;quot;nrfjprog -f nrf52 --rbp ALL&amp;quot; already performs a debug_reset at the end?&lt;br /&gt;What is your source of information? I tried to find the source code for nrfjprog but no luck yet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 RBP (Readback protection) unexpected behavior</title><link>https://devzone.nordicsemi.com/thread/122623?ContentTypeID=1</link><pubDate>Fri, 02 Mar 2018 14:27:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78854064-1f7b-42c2-9103-f7e302d8b2c9</guid><dc:creator>Simen August Tinderholt</dc:creator><description>&lt;p&gt;Hi, is the device permanently halted, or does it come back after a while?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Although it is not strictly necessary for readback_protect, it halts the device to ensure data integrity while writing.&lt;/p&gt;
&lt;p&gt;The procedure is finalized with a debug_reset to load the changes, this should also have released your device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 RBP (Readback protection) unexpected behavior</title><link>https://devzone.nordicsemi.com/thread/122441?ContentTypeID=1</link><pubDate>Thu, 01 Mar 2018 11:40:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88de3b86-52d0-4507-bdd8-e392cd66f444</guid><dc:creator>Austin</dc:creator><description>&lt;p&gt;One way that setting RBP might affect the running program is due to timing for flash writing.&amp;nbsp; The NVM controller will need to be active to write RBP in flash and this could conflict with uses of the NVM controller in your own application.&amp;nbsp; Additionally, if you&amp;#39;re running the SoftDevice during programming of RBP, since the SoftDevice is no longer in control of flash writes made through the SWD port, timing constraints within the SoftDevice may no longer be met and cause a fault.&amp;nbsp; The SoftDevice usually carefully times flash writes with knowledge of other events in the system, but it cannot control writes from external interfaces like SWD.&lt;/p&gt;
&lt;p&gt;Nordic engineers may have more suggestions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 RBP (Readback protection) unexpected behavior</title><link>https://devzone.nordicsemi.com/thread/122355?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2018 17:36:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72145ea1-08f3-4dc1-a784-f1002308b638</guid><dc:creator>Farhang</dc:creator><description>&lt;p&gt;Austin,&lt;/p&gt;
&lt;p&gt;Thanks for the info. However I still want to understand why writing to readback protect (sometimes) causes my program to halt or stop from running. I couldn&amp;#39;t find an answer to that in your response.&lt;/p&gt;
&lt;p&gt;And because you have a pin reset following your RBP you haven&amp;#39;t noticed this issue.&lt;/p&gt;
&lt;p&gt;Although I can confirm at my desk that having the reset after the RBP will recover the device, I need someone from the Nordic design team to explain how setting the RBP might affect the program running in the core, possibly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 RBP (Readback protection) unexpected behavior</title><link>https://devzone.nordicsemi.com/thread/122260?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2018 11:05:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01d3ba5e-18b5-4eb3-91ff-941ad3e361cc</guid><dc:creator>Austin</dc:creator><description>&lt;p&gt;My experience is with the nRF52840 rather than the&amp;nbsp;&lt;span&gt;NRF52832QFAAB0, but I think the devices are similar.&amp;nbsp; The comments here relate to the nRF52840 and you can compare to see if they are relevant for your situation.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Setting read back protection via the APPROTECT register only disables one component of debug port access.&amp;nbsp; The CTRL-AP port remains functional even when protected.&amp;nbsp; See &amp;#39;Debug and Trace&amp;#39; section in the objective specification.&amp;nbsp; This makes sense, since there still needs to be functioning component accessible via SWD which is capable of accepting an ERASEALL type command to unprotect the unit.&amp;nbsp; The CTRL-AP is also capable of issuing device resets.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;ve attempted to perform a similar process for setting APPROTECT for production and the following procedure works for me when using the Python pynrfjprog API.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;# Start the processor before applying readback protection so that CPU
# is operational and running directly after protection is applied.
self.nrfjprog.halt()
self.nrfjprog.debug_reset()
self.nrfjprog.go()

self.nrfjprog.readback_protect(API.ReadbackProtection.ALL)
self.nrfjprog.pin_reset()&lt;/pre&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>