<?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>Interrupt during ISR</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18490/interrupt-during-isr</link><description>Hi, 
 we use the GPIOTE to get informed if the value of a GPIO pin gets from hi to low. 
 If this happens, the GPIOTE event handler will be called. 
 What will happen, if the value of the GPIO pin gets back to hi and again to low during the process</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Dec 2016 09:41:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18490/interrupt-during-isr" /><item><title>RE: Interrupt during ISR</title><link>https://devzone.nordicsemi.com/thread/71326?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2016 09:41:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d0533b9-bfa3-42c5-8254-75f265a1a3b9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;This text might be intersting for you&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A pending interrupt remains pending
until one of the following: The
processor enters the ISR for the
interrupt. This changes the state of
the interrupt from pending to active.
Then: For a level-sensitive interrupt,
when the processor returns from the
ISR, the NVIC samples the interrupt
signal. If the signal is asserted, the
state of the interrupt changes to
pending, which might cause the
processor to immediately re-enter the
ISR. Otherwise, the state of the
interrupt changes to inactive. For a
pulse interrupt, the NVIC continues to
monitor the interrupt signal, and if
this is pulsed the state of the
interrupt changes to pending and
active. In this case, when the
processor returns from the ISR the
state of the interrupt changes to
pending, which might cause the
processor to immediately re-enter the
ISR. If the interrupt signal is not
pulsed while the processor is in the
ISR, when the processor returns from
the ISR the state of the interrupt
changes to inactive.&lt;/p&gt;
&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interrupt during ISR</title><link>https://devzone.nordicsemi.com/thread/71327?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2016 08:15:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3108c3f6-b77f-4353-8d60-c81a49142362</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;that depends .. the second interrupt in the pended state will be processed immediately after the first one only if there are no other interrupts with higher priority pended. Else the higher priority interrupts will be processed first and then when they are completed then the second one which we were talking about would be be cleared from pended state and processed&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interrupt during ISR</title><link>https://devzone.nordicsemi.com/thread/71328?ContentTypeID=1</link><pubDate>Tue, 20 Dec 2016 07:50:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c036186-1b78-4337-a0e0-b16d260f4eec</guid><dc:creator>Markus Mueller</dc:creator><description>&lt;p&gt;&amp;quot;But if only one interrupt of the same source happen during processing, then it will not be lost as it is saved in the pended state of NVIC register.&amp;quot;&lt;/p&gt;
&lt;p&gt;So this means, if the process of the first interrupt is done, a second interrupt is processed because of the pended state of NVIC register?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interrupt during ISR</title><link>https://devzone.nordicsemi.com/thread/71325?ContentTypeID=1</link><pubDate>Mon, 19 Dec 2016 19:45:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:164acae3-1525-484c-8c0a-058948a85f25</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;If the condition for the interrupt is true again while processing the same interrupt, then the interrupt will be pended to NVIC. Read more about the NVIC pend register &lt;a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/Cihjjifh.html"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Since there is only one pending bit per interrupt source, if this condition is true more than once while (or before) processing that interrupt, then the new interrupt will set the pending bit on an already set bit which effectively means the last interrupt(s) which were pended are lost.&lt;/p&gt;
&lt;p&gt;But if only one interrupt of the same source happen during processing, then it will not be lost as it is saved in the pended state of NVIC register.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>