<?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 handle GPIO interrupts while it is configures to SENSE low</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13548/how-to-handle-gpio-interrupts-while-it-is-configures-to-sense-low</link><description>Hi all:
All of the example code is using GPIOTE to demonstrate how to handle GPIO interrupt.
However, it just can configured HiTOLow/LowToHi/Toggle.
If I want to trigger the interrupt by sense Low/High, how can I implement the function.
For example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 19 Jan 2019 05:36:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13548/how-to-handle-gpio-interrupts-while-it-is-configures-to-sense-low" /><item><title>RE: How to handle GPIO interrupts while it is configures to SENSE low</title><link>https://devzone.nordicsemi.com/thread/166623?ContentTypeID=1</link><pubDate>Sat, 19 Jan 2019 05:36:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcb523ac-c445-4a6e-9075-d7cef833f66d</guid><dc:creator>sachin.singh</dc:creator><description>&lt;p&gt;Hi Mikhail,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can try this :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void in_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{&lt;br /&gt;      if(pin == INT1)&lt;br /&gt;        {&lt;br /&gt;            // Function or tast to be done here ...&lt;br /&gt;        }
HAL_GPIO_EXTI_Callback();
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;All the BEST&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to handle GPIO interrupts while it is configures to SENSE low</title><link>https://devzone.nordicsemi.com/thread/51686?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2017 13:31:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3de91fc1-a765-4d67-879b-05ed37aed15d</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I try to use external interrupt from pin.&lt;/p&gt;
&lt;p&gt;Use example  \examples\peripheral\pin_change_int&lt;/p&gt;
&lt;p&gt;but doesn&amp;#39;t work. I can&amp;#39;t receive handler
in_pin_handler()&lt;/p&gt;
&lt;p&gt;my code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void in_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
HAL_GPIO_EXTI_Callback();
}

static void gpio_init2(void)

{
ret_code_t err_code;

err_code = nrf_drv_gpiote_init();
APP_ERROR_CHECK(err_code);

//    nrf_drv_gpiote_out_config_t out_config = GPIOTE_CONFIG_OUT_SIMPLE(false);

nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_LOTOHI(true);
in_config.pull = NRF_GPIO_PIN_NOPULL;

err_code = nrf_drv_gpiote_in_init(INT1, &amp;amp;in_config, in_pin_handler);
APP_ERROR_CHECK(err_code);

nrf_drv_gpiote_in_event_enable(INT1, true);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where is my wrong?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to handle GPIO interrupts while it is configures to SENSE low</title><link>https://devzone.nordicsemi.com/thread/51685?ContentTypeID=1</link><pubDate>Fri, 29 Apr 2016 14:46:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d5c99b3-64af-471a-8187-efb50f3a8769</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi, there are two example projects in the SDK that show usage of the gpiote module:&lt;/p&gt;
&lt;p&gt;\examples\peripheral\pin_change_int&lt;br /&gt;
\examples\peripheral\gpiote&lt;/p&gt;
&lt;p&gt;Typically you initialize the gpiote module with nrf_drv_gpiote_init(), and then for each input pin you want to generate an interrupt you add nrf_drv_gpiote_in_init(), with a parameter to the event handler that should execute on pin change.&lt;/p&gt;
&lt;p&gt;You will notice that the gpiote driver is using the SENSE mechanism only, and not any of the IN events. Main reason for this is that the current consumption is much lower by using SENSE detect, and you are not limited to only 4 pins (there are only 4 configurable IN events).&lt;/p&gt;
&lt;p&gt;Typically the 4 OUT tasks and 4 IN events are used to control something directly through PPI without CPU interaction. For instance one of the examples show how a compare0 event from a timer can toggle an output pin directly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>