<?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 open and close the all interrupts?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36391/how-to-open-and-close-the-all-interrupts</link><description>Hi, There are some codes donot want to be interrupted. Before the execution of those codes, I want to close the all interrupts, after the execution, I want to open the all interrupts, How do I realize this function?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 15 Jul 2018 13:16:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36391/how-to-open-and-close-the-all-interrupts" /><item><title>RE: How to open and close the all interrupts?</title><link>https://devzone.nordicsemi.com/thread/140133?ContentTypeID=1</link><pubDate>Sun, 15 Jul 2018 13:16:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbfad815-acd6-479f-9152-f61249a1714c</guid><dc:creator>tianbing357</dc:creator><description>&lt;p&gt;Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to open and close the all interrupts?</title><link>https://devzone.nordicsemi.com/thread/140012?ContentTypeID=1</link><pubDate>Fri, 13 Jul 2018 07:22:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93d3e8ac-a51e-4249-86ef-f2a8af259581</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You may use &amp;quot;__enable_irq&amp;quot; and &amp;quot;__disable_irq&amp;quot; to disable/enable all interrupts. I would also recommend to have a look at this page from the ARM documentation that gives some background for this topic (&lt;a title="Enabling interrupts using CPS instructions and MSR instructions" href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0321a/BIHBFEIB.html" rel="noopener noreferrer" target="_blank"&gt;Link&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Nordic has in there SDK an slightly enhanced version of these functionality that allows nested calls of disable/enable IRQ. These are called &amp;quot;app_util_disable_irq&amp;quot; and &amp;quot;app_util_enable_irq&amp;quot;.&lt;/p&gt;
&lt;p&gt;Regards Adrian&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>