<?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>When I flash an update of my code, does the stored flash data get erased?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70262/when-i-flash-an-update-of-my-code-does-the-stored-flash-data-get-erased</link><description>I am having problems writing to flash in an older version of s110 using the sd_flash_write() method. The question I have is when I update my code, make a new build, and download the new code to the nRF51822, does the data I have previously written to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Jan 2021 10:03:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70262/when-i-flash-an-update-of-my-code-does-the-stored-flash-data-get-erased" /><item><title>RE: When I flash an update of my code, does the stored flash data get erased?</title><link>https://devzone.nordicsemi.com/thread/291229?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 10:03:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c15a6933-f590-48c5-a77d-1d5ac0718171</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;I know you can switch the project to do just the flash of SoftDevice. But it appeared to have issues. So I went to nrfConnect. However, I didn&amp;#39;t think about the button. That would be an easy way to do it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When I flash an update of my code, does the stored flash data get erased?</title><link>https://devzone.nordicsemi.com/thread/291223?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 09:52:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08c54c90-0615-43e5-830f-f84ddaf2f7bd</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;In our SDK example, you can switch between the project (inside one project) to flash the softdevice only.&amp;nbsp;&lt;br /&gt;Another option you can do is to have a button to erase all application data. So when you hold the button when starting up, the application will erase the data.&amp;nbsp;&lt;br /&gt;If you have a .bat file&amp;nbsp;to execute nrfjprog command, it will very quick and you don&amp;#39;t have to switch to nRF Connect tool.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When I flash an update of my code, does the stored flash data get erased?</title><link>https://devzone.nordicsemi.com/thread/291212?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 09:28:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61abeb12-76eb-4db5-a9ab-a2a893d9adb2</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;That&amp;#39;s what I was afraid of. I think I had issues flashing SoftDevice via the &amp;#39;second project&amp;#39; in Keil and eventually I had to go to the nrfConnect tool to flash SoftDevice successfully. That is quite a pain as it&amp;#39;s a breach of workflow from the IDE and easy to mess up.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When I flash an update of my code, does the stored flash data get erased?</title><link>https://devzone.nordicsemi.com/thread/291210?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 09:23:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af5bbe85-df06-47fb-9dc2-957f11f89868</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You would need to erase the pages you use manually using nrfjprog, it&amp;#39;s because the programmer wouldn&amp;#39;t know where your application data is.&amp;nbsp;&lt;br /&gt;What we usually do is to do a full erase, then flash softdevice then flash application. You can create a .bat file to execute the tasks automatically.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When I flash an update of my code, does the stored flash data get erased?</title><link>https://devzone.nordicsemi.com/thread/291139?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 19:56:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4df2f3c0-6048-4f53-bf5e-27af71e958c8</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;Okay, How can I erase the stuff I write (my application and data associated with my application) but NOT SoftDevice?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When I flash an update of my code, does the stored flash data get erased?</title><link>https://devzone.nordicsemi.com/thread/288393?ContentTypeID=1</link><pubDate>Mon, 11 Jan 2021 13:27:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4eb75ab-7c05-40d1-bf70-6154196e4e1b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Yes, correct. If you choose &amp;quot;erase full chip&amp;quot; the softdevice will be erased.&amp;nbsp;&lt;br /&gt;The algorithm is the Jlink algorithm used by Keil to flash.&amp;nbsp;&lt;br /&gt;This option is equal to calling nrfjprog.exe of --chiperase or --sectorerase when you do nrfjprog --program.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When I flash an update of my code, does the stored flash data get erased?</title><link>https://devzone.nordicsemi.com/thread/288343?ContentTypeID=1</link><pubDate>Mon, 11 Jan 2021 10:47:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:798e00ec-d84b-4acc-bca0-2f151b82931e</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;If I select &amp;#39;Erase Full Chip&amp;#39; does that include SoftDevice as well? So there are three things&lt;/p&gt;
&lt;p&gt;1. SoftDevice&lt;/p&gt;
&lt;p&gt;2. Application&lt;/p&gt;
&lt;p&gt;3. Data persistently stored by the application such as LTKs for bonding&lt;/p&gt;
&lt;p&gt;Is that controlled by the programming algorithm? (It was never clear to me what &amp;#39;programming algorithm&amp;#39; was.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: When I flash an update of my code, does the stored flash data get erased?</title><link>https://devzone.nordicsemi.com/thread/288337?ContentTypeID=1</link><pubDate>Mon, 11 Jan 2021 10:38:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc6b62e0-1fbc-4c03-ade8-19bc7f779e0a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Brian,&amp;nbsp;&lt;br /&gt;It&amp;#39;s depends on the option you selected in Keil Target setup.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0458.sss.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you choose Erase Full chip, any application data will be erased. If you choose Erase Sectors only the sectors that your application occupies (the firmware) will be erased.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;So if you have stored bond information, and you select Erase Sectors, then&amp;nbsp;bond info&amp;nbsp; will retain.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>