<?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 mask pin change inerrupt?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41794/how-to-mask-pin-change-inerrupt</link><description>I am new to nrf52832. I am using pin change interrupt. I want to know that how to mask pin change interrupt? 
 Thanks in Advance</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Jan 2019 08:09:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41794/how-to-mask-pin-change-inerrupt" /><item><title>RE: How to mask pin change inerrupt?</title><link>https://devzone.nordicsemi.com/thread/165651?ContentTypeID=1</link><pubDate>Tue, 15 Jan 2019 08:09:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:522118f6-2875-4b2e-a159-79587dcacff3</guid><dc:creator>pd@learner</dc:creator><description>&lt;p&gt;thanks for quick response. i will check it using&amp;nbsp;void nrf_drv_gpiote_in_uninit(nrf_drv_gpiote_pin_t pin)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to mask pin change inerrupt?</title><link>https://devzone.nordicsemi.com/thread/165647?ContentTypeID=1</link><pubDate>Tue, 15 Jan 2019 08:05:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68280092-8541-4550-b256-ce6f913dd324</guid><dc:creator>Ashish</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is what the documentation of the in_event_enable function says.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**
 * @brief Function for enabling sensing of a GPIOTE input pin.
 *
 * @details If the input pin is configured as high-accuracy pin, the function
 * enables an IN_EVENT. Otherwise, the function enables the GPIO sense mechanism.
 * Note that a PORT event is shared between multiple pins, therefore the
 * interrupt is always enabled.
 *
 * @param[in] pin       Pin.
 * @param[in] int_enable  True to enable the interrupt. Always valid for a high-accuracy pin.
 */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note that a PORT event is shared between multiple pins, therefore the interrupt is always enabled.&lt;/p&gt;
&lt;p&gt;@param[in] int_enable&amp;nbsp; True to enable the interrupt. Always valid for a high-accuracy pin.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Maybe you can try using uninit before going to sleep and init it back again when the device wakes up.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void nrf_drv_gpiote_in_uninit(nrf_drv_gpiote_pin_t pin);
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to mask pin change inerrupt?</title><link>https://devzone.nordicsemi.com/thread/165636?ContentTypeID=1</link><pubDate>Tue, 15 Jan 2019 07:16:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6d79cb5-1ace-4898-8a95-69c25a1a6a50</guid><dc:creator>pd@learner</dc:creator><description>&lt;p&gt;sorry for late reply. I am using sdk12.3.0 and pca10040 board. I have already&amp;nbsp;tried with&amp;nbsp;&amp;nbsp;&lt;span&gt;nrf_drv_gpiote_in_event_disable but interrupt is not disabled.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to mask pin change inerrupt?</title><link>https://devzone.nordicsemi.com/thread/163646?ContentTypeID=1</link><pubDate>Thu, 03 Jan 2019 07:14:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9340283-56f3-4736-b1ec-56911714490e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;nrf_drv_gpiote_in_event_disable which in turn calls&amp;nbsp;nrfx_gpiote_in_event_disable seems to be disabling the interrupt in nrfx_gpiote.c (SDK15.2)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to mask pin change inerrupt?</title><link>https://devzone.nordicsemi.com/thread/163010?ContentTypeID=1</link><pubDate>Wed, 26 Dec 2018 17:53:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fdba0c0-94e3-4d10-bf54-ba78b213740e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Most of us on holidays until New year. We will get back to you once we are back to office after 2nd January.&amp;nbsp;We appreciate your patience.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to mask pin change inerrupt?</title><link>https://devzone.nordicsemi.com/thread/162976?ContentTypeID=1</link><pubDate>Tue, 25 Dec 2018 06:43:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2b6aa81-9bf9-4759-8b04-8cdf255b85d8</guid><dc:creator>Sainath</dc:creator><description>&lt;p&gt;I too have same problem can anyone&amp;nbsp;assist the same..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to mask pin change inerrupt?</title><link>https://devzone.nordicsemi.com/thread/162904?ContentTypeID=1</link><pubDate>Sat, 22 Dec 2018 14:00:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcb41d0e-bd11-41a6-a976-2e653ea3991d</guid><dc:creator>pd@learner</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I actually want to Mask/ignore/disable an particular interrupt PIN before making nrf sleep, and again unmask/enable the same PIN after wake from sleep, to make sleep i have used&amp;nbsp; this API &amp;gt;&amp;gt; sd_app_evt_wait() &amp;lt;&amp;lt;&lt;/p&gt;
&lt;p&gt;following function is to enable interrupt of pin,&lt;/p&gt;
&lt;p&gt;static void gpio_init(void)&lt;br /&gt;{&lt;br /&gt; ret_code_t err_code;&lt;/p&gt;
&lt;p&gt;err_code = nrf_drv_gpiote_init();&lt;/p&gt;
&lt;p&gt;nrf_drv_gpiote_in_config_t pin_config = {&lt;br /&gt; .is_watcher = false, &lt;br /&gt; .hi_accuracy = true, &lt;br /&gt; .pull = NRF_GPIO_PIN_PULLUP, &lt;br /&gt; .sense = NRF_GPIOTE_POLARITY_HITOLO&lt;br /&gt; };&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; err_code = nrf_drv_gpiote_in_init(PIN_NUM, &amp;amp;pin_config,pin_handler);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;nrf_drv_gpiote_in_event_enable(PIN_NUM, true);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to mask pin change inerrupt?</title><link>https://devzone.nordicsemi.com/thread/162689?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2018 14:34:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e27d7147-46ec-4091-bb49-545051438383</guid><dc:creator>pd@learner</dc:creator><description>&lt;p&gt;Thanks for quick response.&lt;/p&gt;
&lt;p&gt;How to configure pin change interrupt for mask&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to mask pin change inerrupt?</title><link>https://devzone.nordicsemi.com/thread/162632?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2018 10:44:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ed22d76-d9bb-4b85-9167-eb1f52aa59f9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Mask as in&amp;nbsp;to make the MCU ignore the interrupts generated. Then you can do that by disabling them at NVIC level (even though the interrupt is enabled in GPIO level)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NVIC_EnableIRQ(GPIOTE_IRQn);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you are using BLE softdevice then, it is as below&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;sd_nvic_DisableIRQ(GPIOTE_IRQn);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>