<?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>How to write NVM flash?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15350/how-to-write-nvm-flash</link><description>Hi,
I use the nrf24le1 device in my design. I want to stroe data when power is off, so I write data to the NVM flash. But something is wrong in my design, could you help me ?
I have two codes, the first code is described as follows:
The flash is earsed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Jul 2016 12:32:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15350/how-to-write-nvm-flash" /><item><title>RE: How to write NVM flash?</title><link>https://devzone.nordicsemi.com/thread/58660?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 12:32:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5fd4e32-f03f-4024-9288-e4e107659e37</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Liu: How did you flash the new program ? There is a chance that the whole chip is erased before you flash the second firmware. This explain why you see 0xFF when you read on the 2nd firmware.
If you don&amp;#39;t switch firmware, but simply do this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Read the address,&lt;/li&gt;
&lt;li&gt;If it&amp;#39;s 0xFF then write to the address a value, 0x01 for example&lt;/li&gt;
&lt;li&gt;If it&amp;#39;s 0x01 then do something else.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then you don&amp;#39;t have to switch firmware to test the flash writing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>