<?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>Disable interrupts</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18722/disable-interrupts</link><description>Hi,
I want to do this cycle with GPIO without interrupting it on NRF51 with BLE softdevice: 
 
 PIN1 to HIGH level 
 read value of PIN2 
 PIN1 to LOW level 
 
 Repeat this 25 times (between cycles interrupts can happen) 
 What is the easiest way</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Jan 2017 09:31:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18722/disable-interrupts" /><item><title>RE: Disable interrupts</title><link>https://devzone.nordicsemi.com/thread/72299?ContentTypeID=1</link><pubDate>Tue, 03 Jan 2017 09:31:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fad92a53-85c9-4d9b-bcb4-c619b443221a</guid><dc:creator>gaminn</dc:creator><description>&lt;p&gt;OK, thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable interrupts</title><link>https://devzone.nordicsemi.com/thread/72298?ContentTypeID=1</link><pubDate>Tue, 03 Jan 2017 09:28:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abfb3295-008f-4e56-9810-2179797daa9f</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;We strongly recommend not to disable global interrupts (and hence softdevice interrupts) but if you do not have any option then disabling it for &amp;lt;=10us should work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable interrupts</title><link>https://devzone.nordicsemi.com/thread/72297?ContentTypeID=1</link><pubDate>Tue, 03 Jan 2017 09:19:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b687350-3684-44b7-a491-bf669698f1fb</guid><dc:creator>gaminn</dc:creator><description>&lt;p&gt;The whole cycle will last &amp;lt;=6 us. So is it really possible to disable interrupts for &amp;lt;=10 us by __disable_irq();? Because there was a post on this forum (I can&amp;#39;t remember the link) stating that disabling softdevice interrupts for arbitrary time period will eventually break timing in softdevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable interrupts</title><link>https://devzone.nordicsemi.com/thread/72296?ContentTypeID=1</link><pubDate>Tue, 03 Jan 2017 09:03:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26aa7849-f056-4d77-bb85-6ebb00280024</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;the softdevice will allow blocking its interrupts for &amp;lt;=10us. But 60us is too much and the softdevice may assert if you try to block its interrupts for so long.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable interrupts</title><link>https://devzone.nordicsemi.com/thread/72295?ContentTypeID=1</link><pubDate>Tue, 03 Jan 2017 08:51:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c2aee7f-c9ad-42b1-9b7a-f1ea14475c64</guid><dc:creator>gaminn</dc:creator><description>&lt;p&gt;I apologize. I want to execute steps 1) to 3) without being interrupted by any interrupt (user interrupt or softdevice interrupt), because I have to keep strict timing of the peripheral which is connected to the GPIO (PIN1 HIGH level can&amp;#39;t last more than 60 us in no way).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disable interrupts</title><link>https://devzone.nordicsemi.com/thread/72294?ContentTypeID=1</link><pubDate>Tue, 03 Jan 2017 08:46:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3618e4c2-21a7-4efe-b6e8-56ed98ee0894</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Im little confused with the title and the contents of the question. Are you asking if you can read PIN2 everytime PIN1 have a transition to high level for 25 cycles without enabling GPIO interrupt?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>