<?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>JLinkExe equivalent of nrfjprog --erasepage</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21491/jlinkexe-equivalent-of-nrfjprog---erasepage</link><description>Hello,
We&amp;#39;re using JLinkExe for production programming. Is there an equivalent of the nrfjprog --erasepage command for JLinkExe? 
 I&amp;#39;m looking for the equivalent of 
 nrfjprog -f nrf52 --erasepage 0x0007F000-0x00080000
 
 It would be cool if nrfjprog</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 21 Apr 2017 09:03:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21491/jlinkexe-equivalent-of-nrfjprog---erasepage" /><item><title>RE: JLinkExe equivalent of nrfjprog --erasepage</title><link>https://devzone.nordicsemi.com/thread/84325?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2017 09:03:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7173ecea-d1d1-4808-be6e-eb63d64d9c21</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Jacob,&lt;/p&gt;
&lt;p&gt;in order to erase a page on the nRF52 you first have to enable erase mode by writing to the &lt;code&gt;CONFIG&lt;/code&gt; register and then write the address of the first word on the flash page to the &lt;code&gt;ERASEPAGE&lt;/code&gt; register of the NVMC peripheral, see &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/nvmc.html?cp=2_2_0_10_6_2#register.ERASEPAGE"&gt;this&lt;/a&gt; section of the nRF52832 Product Specification. Thus, if you want to erase the flash page starting at 0x7F000 you use the following commands&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;w4 4001E504 2
w4 4001E508 0007f000
w4 4001E504 0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The last command sets the program memory access mode to read access only.&lt;/p&gt;
&lt;p&gt;You also might want to take a look at pynrfjprog, &lt;a href="https://github.com/NordicSemiconductor/pynrfjprog"&gt;here&lt;/a&gt; is the link to the GitHub repo.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>