<?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>data written flash is erased</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7917/data-written-flash-is-erased</link><description>Hi: 
 i use SDK7.0 , i write data in flash (address:0x0003fc00)and the data is erased when SDK run.
 
 and is there any way to protect the page that i want to write or other solution.thanks.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Jul 2015 12:47:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7917/data-written-flash-is-erased" /><item><title>RE: data written flash is erased</title><link>https://devzone.nordicsemi.com/thread/28299?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2015 12:47:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efb7cd46-a89f-40b3-af36-e12f5ab0146c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;When the SoftDevice is enabled you should use sd_flash_page_erase() and sd_flash_write() functions. Please see Section 7 in the S110 SoftDevice Specification 2.0 for more information.&lt;/p&gt;
&lt;p&gt;If the flash operation is succesful you will get a NRF_EVT_FLASH_OPERATION_SUCCESS event in sys_evt_dispatch(). I recommend you to have a flag that is set you do a flash operation, and is unset when you get NRF_EVT_FLASH_OPERATION_SUCCESS. Check the flag before you do a flash operation.&lt;/p&gt;
&lt;p&gt;We also have a module for handling flash operations, &lt;a href="https://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v8.x.x/doc/8.1.0/s110/html/a00168.html"&gt;Pstorage&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: data written flash is erased</title><link>https://devzone.nordicsemi.com/thread/28298?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2015 15:07:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1337a233-92db-4119-8632-97046b932b42</guid><dc:creator>jerly</dc:creator><description>&lt;p&gt;thank you for your answer.i used a softdevice(7.1).and i used&amp;quot;ble_flash_block_write&amp;quot; in ble_flash.c directly.the data was written right when the code run after &amp;quot;ble_flash_block_write&amp;quot;.but when i continued running the code.and i watched memory was clear.maybe data was cleared by sdk or sd.and do you have any demo code or other solution for me.thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: data written flash is erased</title><link>https://devzone.nordicsemi.com/thread/28297?ContentTypeID=1</link><pubDate>Tue, 30 Jun 2015 11:31:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25938676-bd38-402a-90cb-9662148b1abf</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;How are you writing to flash? Are you using a SoftDevice? What do you mean by when SDK run?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>