<?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>SDK 15.3.0 Flash_fstorage example not working as expected</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54666/sdk-15-3-0-flash_fstorage-example-not-working-as-expected</link><description>Hello, 
 nRF52840-DK 
 SDK 15.3.0 
 SoftDevice: s140 
 IDE: SES 
 Example: Flash_fstorage_s140_pca10056 
 I do not read back the expected value in the example. The terminal image also show a read of the entire section of memory. I would expect the results</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Nov 2019 08:47:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54666/sdk-15-3-0-flash_fstorage-example-not-working-as-expected" /><item><title>RE: SDK 15.3.0 Flash_fstorage example not working as expected</title><link>https://devzone.nordicsemi.com/thread/221487?ContentTypeID=1</link><pubDate>Fri, 22 Nov 2019 08:47:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:404046d7-dc80-4823-a2a3-e5582ac18dee</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;The reason for this behavior is the following: When flash is erased, all bits in flash is set to &amp;#39;1&amp;#39;. Writing to flash consists of setting the necessary bits to &amp;#39;0&amp;#39;. Setting bits back to &amp;#39;1&amp;#39; can only be done by erasing the flash page.&lt;/p&gt;
&lt;p&gt;If you did not erase the flash, s&lt;span&gt;ome of them will already be &amp;#39;0&amp;#39;, and some new ones will have to be switched. In addition, some bits that should be &amp;#39;1&amp;#39; will also be &amp;#39;0&amp;#39;, because it is already written before. Therefore, it will not work as you expect.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Please also see this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/32517/problems-with-using-flash-and-fstorage"&gt;post&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 15.3.0 Flash_fstorage example not working as expected</title><link>https://devzone.nordicsemi.com/thread/221344?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2019 13:52:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79511dea-2a8a-43e3-b8f3-bfc6b41e7523</guid><dc:creator>BEplane</dc:creator><description>&lt;p&gt;I was able to get the example to work by erasing the board first.&lt;/p&gt;
&lt;p&gt;In SES:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Target &amp;gt;&amp;gt; Connect J-Link&lt;/li&gt;
&lt;li&gt;Target &amp;gt;&amp;gt; Erase All&lt;/li&gt;
&lt;li&gt;Target &amp;gt;&amp;gt; Download&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Do you have an explanation of why this does not work if you do not erase? The idea is that you are writing to flash, so regardless of what is there I would expect the value to be written?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 15.3.0 Flash_fstorage example not working as expected</title><link>https://devzone.nordicsemi.com/thread/221317?ContentTypeID=1</link><pubDate>Thu, 21 Nov 2019 12:34:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe719661-10a8-4d5f-9378-0cd5555ea555</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Paul,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you erase the flash with the following command and load the image again?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrfjprog -e&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tested the project under \nRF5_SDK_15.3.0_59ac345\examples\peripheral\flash_fstorage\pca10056\s140. It could work as the following figure, and you also could view the values in the Segger memory window.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-60f125ee0b7d45f988d1a301a6fa5cca/239737_5F00_2.png" /&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>