<?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 erase problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19382/nrf52-flash-erase-problem</link><description>Hi, i use the original ble_app_template (sdk11) with two lines of code added by me (See below) which erase the last page in flash (flash_page_erase((uint32_t *)(pg_size * pg_num))). First line executes ok, but the second line not. I would like to be able</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Feb 2017 15:21:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19382/nrf52-flash-erase-problem" /><item><title>RE: nrf52 flash erase problem</title><link>https://devzone.nordicsemi.com/thread/75212?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2017 15:21:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33c47fcc-feaa-44e9-a138-b9ef582fa6d6</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;After the SoftDevice have been enabled, you should use the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/flash_mem_api/flash_mem_api.html?cp=2_3_0_0_7"&gt;Flash memory API&lt;/a&gt;. Use &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v5.0.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=2_3_0_1_0_2_7_2_9#ga8b49f2e72e97291aecc18ce396956eed"&gt;sd_flash_write()&lt;/a&gt; to write and &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v5.0.0/group___n_r_f___s_o_c___f_u_n_c_t_i_o_n_s.html?cp=2_3_0_1_0_2_7_2_7#ga9c93dd94a138ad8b5ed3693ea38ffb3e"&gt;sd_flash_page_erase()&lt;/a&gt; to erase.
The API will schedule flash access in between radio events automatically, to avoid conflicts between the radio and the flash operations.&lt;/p&gt;
&lt;p&gt;If the erase is successful the &lt;code&gt;NRF_EVT_FLASH_OPERATION_SUCCESS&lt;/code&gt; event will be received in sys_evt_dispatch().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>