<?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>Write in flash nrf51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53203/write-in-flash-nrf51822</link><description>Hi all, 
 I am trying to write in flash but when i use: 
 pg_size = NRF_FICR-&amp;gt;CODEPAGESIZE; pg_num = NRF_FICR-&amp;gt;CODESIZE - 1; // Use last page in flash 
 addr = (uint32_t *)(pg_size * pg_num); 
 flash_page_erase(addr); &amp;lt;=====here is the problem the system</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Oct 2019 13:26:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53203/write-in-flash-nrf51822" /><item><title>RE: Write in flash nrf51822</title><link>https://devzone.nordicsemi.com/thread/214862?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2019 13:26:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:320cee19-ecf0-4855-9a94-62f79c0c8aea</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is&amp;nbsp;&lt;span&gt;flash_page_erase() accessing the NVMC directly?&amp;nbsp;The NVMC can&amp;#39;t be accessed directly while the Softdevice is enabled. Instead, it must be accessed through the Softdevice&amp;#39;s Flash API:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a title="Flash memory API" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.sds/dita/softdevices/s130/flash_mem_api/flash_mem_api.html?cp=4_7_2_0_7"&gt;Flash memory API&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a title="sd_flash_page_erase" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.1/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=4_7_2_2_2_7_2_7#ga9c93dd94a138ad8b5ed3693ea38ffb3e"&gt;sd_flash_page_erase&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a title="sd_flash_write" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.1/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=4_7_2_2_2_7_2_9#ga8b49f2e72e97291aecc18ce396956eed"&gt;sd_flash_write&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&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>