<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/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/"><channel><title>Volatile variables</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/14668/volatile-variables</link><description> What is the meaning of Volatile used in a variable declaration? 
 
Thank&amp;#39;s 
 
Sergio </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Volatile variables</title><link>https://community.arm.com/thread/95006?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2002 13:58:02 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:afd4ee99-609c-40bb-93ca-d44da13dd4b6</guid><dc:creator>Jon Ward</dc:creator><description>&lt;p&gt;&lt;i&gt;I think Keil C51 implicitly specifies volatile for SFRs?&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Yep - That&amp;#39;s correct.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Jon&lt;/b&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Volatile variables</title><link>https://community.arm.com/thread/54301?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2002 16:46:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:485b4a23-566d-4a0e-bc68-26ff79b1d139</guid><dc:creator>Andrew Neil</dc:creator><description>&lt;p&gt;memory-mapped IO variables would also need to be specified as &lt;b&gt;volatile&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I think Keil C51 implicitly specifies &lt;b&gt;volatile&lt;/b&gt; for SFRs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Volatile variables</title><link>https://community.arm.com/thread/50134?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2002 09:55:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c14e67af-38dc-4918-aaf7-6b1d458b2d90</guid><dc:creator>Scott deWolski</dc:creator><description>&lt;p&gt;This is a &amp;#39;C&amp;#39; question.&lt;br /&gt;
Volatile tells the compiler/optimizer to not assume a variable will be the same from use to use.  This stops the optimzer from loading a variable into a register and using the value there instead of re-reading the variable.&lt;br /&gt;
&lt;br /&gt;
It is used on any variable which may be changed in an ISR or a different thread/task in a multi-thread/task system.&lt;br /&gt;
Best luck&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>