<?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>Can Interrupt be Servied even when Micro controller hangs??</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/19984/can-interrupt-be-servied-even-when-micro-controller-hangs</link><description> 
Hi Frnds, 

 
Can a Interrupt Service Routine be serviced even when Micro
controller hangs for undue reasons?? 

 
what is a hang in Microcontroller means???? 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Can Interrupt be Servied even when Micro controller hangs??</title><link>https://community.arm.com/thread/130106?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2007 05:50:07 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:150e70a2-da43-4749-9527-2e39fc4a8bd7</guid><dc:creator>Rajesh N</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanx andy.,&lt;/p&gt;

&lt;p&gt;
i will go through the document and find som solution for watchdog
timer..,&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Interrupt be Servied even when Micro controller hangs??</title><link>https://community.arm.com/thread/123601?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2007 05:40:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:56fc80a6-ad3b-4bd3-93dd-f2556feeef8f</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;I am servicing watchdog timer in Interrupt&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
And now you know why that&amp;#39;s a really bad idea!&lt;br /&gt;
(but see below)&lt;/p&gt;

&lt;p&gt;
The idea is that the Watchdog should be restarted if &lt;i&gt;&lt;b&gt;and
only if&lt;/b&gt;&lt;/i&gt; the software is running correctly.&lt;/p&gt;

&lt;p&gt;
Therefore, you should put your Watchdog restarts at a point in
your code that is always reached when it&amp;#39;s running properly, but
won&amp;#39;t be reached if anything hangs.&lt;/p&gt;

&lt;p&gt;
Typically, this would be in your main loop.&lt;/p&gt;

&lt;p&gt;
If you do have some operations that you know can take longer than
the watchdog interval, you will have to either split them, or think
of some solution.&lt;/p&gt;

&lt;p&gt;
One way to extend the watchdog period does use an interrupt:&lt;br /&gt;
Instead of restarting the watchdog directly, your main code restarts
a global counter variable;&lt;br /&gt;
The timer interrupt then decrements the variable, and only restarts
the watchdog if it is above some limit...&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.ganssle.com/watchdogs.pdf"&gt;www.ganssle.com/watchdogs.pdf&lt;/a&gt;&lt;br /&gt;

&lt;a href="http://www.ganssle.com/tem/tem105.pdf"&gt;www.ganssle.com/.../tem105.pdf&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Interrupt be Servied even when Micro controller hangs??</title><link>https://community.arm.com/thread/112583?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2007 04:59:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7cd692e5-2277-4307-b0f8-8a7207d17afd</guid><dc:creator>Rajesh N</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanx for u kind reply.&lt;/p&gt;

&lt;p&gt;
I am servicing watchdog timer in Interrupt, I am using a External
watchdog timer, Max691 where it has to be serviced within 1.5secs ,
so how is this programmed if at all watchdog timers should not be
serviced in interrupt????&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Interrupt be Servied even when Micro controller hangs??</title><link>https://community.arm.com/thread/98796?ContentTypeID=1</link><pubDate>Sat, 06 Jan 2007 03:37:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6e00f05f-b221-4696-ad92-7e07a8c151b2</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;But my question is then the whole theory of watchdog timer
fails ... it keeps servicing watchdog timer from Interrupt.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
That is precisely why you should &lt;i&gt;&lt;b&gt;not&lt;/b&gt;&lt;/i&gt; service the
watchdog in a timer interrupt!&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;Then what is a critical Micro controller hang????&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Are you using an internal (on-chip) watchdog within your
microcontroller?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Interrupt be Servied even when Micro controller hangs??</title><link>https://community.arm.com/thread/74699?ContentTypeID=1</link><pubDate>Sat, 06 Jan 2007 01:32:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:83ea4eaa-3fc6-498e-9b79-4612a4b36d75</guid><dc:creator>Rajesh N</dc:creator><description>&lt;p&gt;&lt;p&gt;
But my question is then the whole theory of watchdog timer
fails.., even when system is hanged , it keeps servicing watchdog
timer from Interrupt.&lt;/p&gt;

&lt;p&gt;
How is this possible to service watchdog timer without timer
interrupt????&lt;/p&gt;

&lt;p&gt;
Then what is a critical Micro controller hang????&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can Interrupt be Servied even when Micro controller hangs??</title><link>https://community.arm.com/thread/47534?ContentTypeID=1</link><pubDate>Sat, 06 Jan 2007 01:26:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d6732223-40ea-4d1c-a6d1-201d13203b37</guid><dc:creator>barry gordon</dc:creator><description>&lt;p&gt;&lt;p&gt;
A uP can be in a hung state if its stuck in a loop, for
instance:&lt;/p&gt;

&lt;pre&gt;
while(1)
{
   // do something
   if (result == TRUE)
      break;
}
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
This loop will never exit if result never becomes TRUE. When an
interrupt is generated, the interrupt code will be executed. The exit
of the interrupt code will then return execution back to this stuck
loop.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>