<?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 create persistent variable?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26214/how-to-create-persistent-variable</link><description>I want to keep the value of the variable even if there is power interruption or reset in the system. That&amp;#39;s why I want to create persistent variable in main. Do I need to use pstorage for this, or can I define a custom global variable like persistent</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Oct 2017 08:15:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26214/how-to-create-persistent-variable" /><item><title>RE: How to create persistent variable?</title><link>https://devzone.nordicsemi.com/thread/103238?ContentTypeID=1</link><pubDate>Tue, 24 Oct 2017 08:15:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a17e70bc-b35e-434b-9c6d-425deb1eb5eb</guid><dc:creator>purgoufr</dc:creator><description>&lt;p&gt;I read &lt;a href="http://www.newtonlabs.com/ic/ic_5.html#SEC9"&gt;this link&lt;/a&gt; .That&amp;#39;s why I said persistent variable in C. Frankly, I never use it. I will be back after searching fstorage and fds libraries.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create persistent variable?</title><link>https://devzone.nordicsemi.com/thread/103237?ContentTypeID=1</link><pubDate>Tue, 24 Oct 2017 07:30:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5bff088-a7bb-499a-8a7b-fc636025e487</guid><dc:creator>emdi</dc:creator><description>&lt;p&gt;There are no &amp;#39;persistent&amp;#39; variables in C.&lt;/p&gt;
&lt;p&gt;You might use a library or a machine register for that, depending on your needs and what version of the SDK you are using.&lt;/p&gt;
&lt;p&gt;In the more recent versions of the SDK there are two libraries for that: fstorage and fds.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>