<?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>Problem with using Routines in Main program file in the Interrupt service routine</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/18107/problem-with-using-routines-in-main-program-file-in-the-interrupt-service-routine</link><description> I have a routine in my main program file for displaying float values on terminal program. When i try to use the same routine in my Interrupt service routine(ISR), it give an warning stating &amp;quot;Reference made to unresolved function&amp;quot;. Secondly i also wanted</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Problem with using Routines in Main program file in the Interrupt service routine</title><link>https://community.arm.com/thread/111641?ContentTypeID=1</link><pubDate>Sat, 03 Sep 2005 04:04:25 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4aa82cd3-b04a-454a-8998-79e126679af4</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;A global variable shared between an ISR and main code should be declared &lt;b&gt;volatile&lt;/b&gt;.&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Note that this is &lt;b&gt;in addition to&lt;/b&gt; Hans-Bernhard &amp;amp; Erik&amp;#39;s notes about &amp;quot;atomic&amp;quot; accesses - not an alternative!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with using Routines in Main program file in the Interrupt service routine</title><link>https://community.arm.com/thread/97441?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2005 17:58:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bbabb28a-6946-424c-a466-94b226c9d37b</guid><dc:creator>Drew Davis</dc:creator><description>&lt;p&gt;Also study the &lt;b&gt;volatile&lt;/b&gt; keyword.  A global variable shared between an ISR and main code should be declared volatile.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with using Routines in Main program file in the Interrupt service routine</title><link>https://community.arm.com/thread/87372?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2005 07:38:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:baa9ee1e-4d8f-4ffd-affb-fcb3a92a8d1f</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;Secondly i also wanted to know how can i use a global variable in the ISR&lt;br /&gt;
&lt;br /&gt;
Just do it. But be sure not to use a multi-byte variable, or if you do, read up on multi-threaded programming techniques like &amp;quot;semaphores&lt;br /&gt;
&lt;br /&gt;
a better search word might be &amp;quot;atomic&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Erik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with using Routines in Main program file in the Interrupt service routine</title><link>https://community.arm.com/thread/44619?ContentTypeID=1</link><pubDate>Fri, 02 Sep 2005 06:53:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0630d20e-77d1-4832-a084-d78b5b2845de</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;i&gt;When i try to use the same routine in my Interrupt service routine(ISR), it give an warning stating &amp;quot;Reference made to unresolved function&amp;quot;.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
That&amp;#39;s two bad things in one sentence.  First, you shouln&amp;#39;t be doing such excessively hard work as formatting an FP number in an ISR, &lt;b&gt;ever&lt;/b&gt;.  Second, that&amp;#39;s not a warning, it&amp;#39;s an error, and it says you didn&amp;#39;t actually manage to call the same routine---probably just a typo in the call to it, but it&amp;#39;s impossible for anyone out here to be sure, since you didn&amp;#39;t show any actual code.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Secondly i also wanted to know how can i use a global variable in the ISR&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Just do it.  But be sure not to use a multi-byte variable, or if you do, read up on multi-threaded programming techniques like &amp;quot;semaphores&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>