<?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 Flash Protection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15900/nrf52-flash-protection</link><description>We would like to enable the flash protection for an nRF52 application with the typical scenario: 
 
 to disable flash reads from the JTAG,SWD interface; only erase/reprogram should be possible. 
 flash writes from our firmware internally should be</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Aug 2016 09:24:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15900/nrf52-flash-protection" /><item><title>RE: nRF52 Flash Protection</title><link>https://devzone.nordicsemi.com/thread/60648?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2016 09:24:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df895285-59fb-48ac-a27b-69e95c970756</guid><dc:creator>Adam Varga</dc:creator><description>&lt;p&gt;That did the trick, thank you so much!
For anyone with the same issue:
look for NVMC CONFIG register and WEN.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Flash Protection</title><link>https://devzone.nordicsemi.com/thread/60646?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2016 23:39:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:469008ce-9571-45e6-afc4-e079957adec8</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Did you do a reset? The UICR contents is only loaded after a reset. And thinking about it, if UICR counts as flash, you need to enable the NVMC for flash writes before you write it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Flash Protection</title><link>https://devzone.nordicsemi.com/thread/60649?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2016 14:42:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8c95dae-718e-4566-8055-23001f210e39</guid><dc:creator>Adam Varga</dc:creator><description>&lt;p&gt;When I write 0xFFFFFF00 to that register and I read it back after that, I get 0x47004800. When I read in the first place I get the reset value (0xFFFFFFFF).&lt;/p&gt;
&lt;p&gt;Anyways, I can still read back the whole memory after writing the given values to the APPROTECT register. What do I do wrong?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Flash Protection</title><link>https://devzone.nordicsemi.com/thread/60647?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2016 15:23:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc9b4f1f-15ea-4130-98db-cef86629affd</guid><dc:creator>Adam Sillye</dc:creator><description>&lt;p&gt;Ahh... thank you! :) It&amp;#39;s there indeed... We&amp;#39;ll put it right in the beginning.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 Flash Protection</title><link>https://devzone.nordicsemi.com/thread/60645?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2016 12:11:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13f8218f-88da-4217-9b1c-a6470c29e5a9</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;This is in section 14.1.62 of the product spec, the description for the APPPROTECT register which tells you to write 0x00 to the lowest 8 bits of that register to disable SWD access.&lt;/p&gt;
&lt;p&gt;You can do that any way you please, by putting it in the code image, by setting it afterwards with a debugger (thus disabling that debugger from then on) or having the code check and write it the first time it runs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>