<?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 on falling edge</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60841/interrupt-on-falling-edge</link><description>Hello community 
 
 In the pin_change_int example the following code is written: 
 
 So, this basically means: whenever PIN_IN goes from low to high, the &amp;#39;in_pin_handler&amp;#39; is called. 
 Is there a quick and easy way to make it call the &amp;#39;in_pin_handler&amp;#39;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Apr 2020 08:54:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60841/interrupt-on-falling-edge" /><item><title>RE: Interrupt on falling edge</title><link>https://devzone.nordicsemi.com/thread/247480?ContentTypeID=1</link><pubDate>Thu, 30 Apr 2020 08:54:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38c54a48-ed03-4b1c-9973-da554fa06437</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The second parameter to&amp;nbsp;nrf_drv_gpiote_in_init() is of type nrf_drv_gpiote_in_config_t, and this configures the the interrupt generation. You should configure it with one of three macros:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GPIOTE_CONFIG_IN_SENSE_HITOLO to get an interrupt when the input goes from high to low (falling edge)&lt;/li&gt;
&lt;li&gt;GPIOTE_CONFIG_IN_SENSE_LOTOHI to get an interrupt when the input goes from low to high (rising edge)&lt;/li&gt;
&lt;li&gt;GPIOTE_CONFIG_IN_SENSE_TOGGLE to get interrupts on both edges.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So in practice, you just need to change your code&amp;nbsp;to something similar to this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    nrf_drv_gpiote_in_config_t config = GPIOTE_CONFIG_IN_SENSE_HITOLO(true);
    err_code = nrf_drv_gpiote_in_init(p_btn-&amp;gt;pin_no, &amp;amp;config, gpiote_event_handler);
    VERIFY_SUCCESS(err_code);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>