<?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>Use of pre incrementer in flashwrite example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3124/use-of-pre-incrementer-in-flashwrite-example</link><description>Hello All, 
 I was looking at the flash writewrite_example and the starting address is defines as: 
 addr = (uint32_t *)(pg_size * pg_num);
 
 Later in the code, the example writes to flash using the following function call: 
 flash_word_write(+</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Jul 2014 14:33:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3124/use-of-pre-incrementer-in-flashwrite-example" /><item><title>RE: Use of pre incrementer in flashwrite example</title><link>https://devzone.nordicsemi.com/thread/11573?ContentTypeID=1</link><pubDate>Wed, 23 Jul 2014 14:33:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58785523-a826-45ad-a670-81a92d16e2f9</guid><dc:creator>Matt Leising</dc:creator><description>&lt;p&gt;pstorage seems to be the better route. Thanks, it would be nice to see a little more documentation and/or examples on it though. Thanks for your help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use of pre incrementer in flashwrite example</title><link>https://devzone.nordicsemi.com/thread/11572?ContentTypeID=1</link><pubDate>Mon, 14 Jul 2014 20:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39a4fd48-18a7-4ad1-abbf-de8301ac282d</guid><dc:creator>John</dc:creator><description>&lt;p&gt;I believe that the code that implemented flash_word_write and related functions for that example stored a &amp;quot;magic number&amp;quot; as the first thing in each flash page written as an error check. So the pre-increment is probably a way of stepping over that.&lt;/p&gt;
&lt;p&gt;That said, if you are using one of the newer SDKs like 5.2.0, you should consider using the pstorage API to store and recover information from the flash. It hides a lot of the complexity for you.&lt;/p&gt;
&lt;p&gt;I do not know enough about the bond manager to help you with that question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>