<?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>GPIOTE interrupt has not trigger</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23583/gpiote-interrupt-has-not-trigger</link><description>I want to generate an interrupt event use pin30 when it goes from low-&amp;gt;high or high-&amp;gt;low.
First I register a gpiote user by 
 app_gpiote_user_params_t app_gpiote_params =
{
 .pins_low_to_high_mask = (1 &amp;lt;&amp;lt; CONFIG_IO_BATDETECT),
 .pins_high_to_low_mask</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 Jul 2017 10:59:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23583/gpiote-interrupt-has-not-trigger" /><item><title>RE: GPIOTE interrupt has not trigger</title><link>https://devzone.nordicsemi.com/thread/92647?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 10:59:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b0e530c-94a4-4462-830a-23c4eed0d62b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;When the device in systemOFF mode, GPIOTE won&amp;#39;t work, you need to configure it with Sense and DETECT signal from GPIO not GPIOTE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE interrupt has not trigger</title><link>https://devzone.nordicsemi.com/thread/92648?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 09:55:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b4df4c0-7ba0-4f0d-b84c-5c336b1b3b5b</guid><dc:creator>JackSnow</dc:creator><description>&lt;p&gt;This example code help me solve the problem:&lt;a href="https://github.com/NordicSemiconductor/nrf51-powerdown-examples"&gt;nrf5x-powerdown-examples&lt;/a&gt;. Thanks anyway.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE interrupt has not trigger</title><link>https://devzone.nordicsemi.com/thread/92646?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 02:48:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e83e2d4-f2a1-474e-a015-0b4edaea1f16</guid><dc:creator>JackSnow</dc:creator><description>&lt;p&gt;Thanks,Hung Bui.
In the SR3 application app_gpiote_user_register() is defined as:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static inline uint32_t app_gpiote_user_register(app_gpiote_user_id_t *     p_user_id,
                                            uint32_t                   pins_low_to_high_mask,
                                            uint32_t                   pins_high_to_low_mask,
                                            app_gpiote_event_handler_t event_handler)
{
const app_gpiote_user_params_t params = {
    .pins_low_to_high_mask = pins_low_to_high_mask,
    .pins_high_to_low_mask = pins_high_to_low_mask,
    .config                = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false)
};
return app_gpiote_user_register_param(p_user_id, &amp;amp;params, event_handler);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Maybe the voltage of pin30 is not stablization, sometimes the function can be triggered now(I didn&amp;#39;t configure the pin as input),but this only happens in the SYSTEM ON mode. Once switch to SYSTEM OFF mode, nothing happens.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE interrupt has not trigger</title><link>https://devzone.nordicsemi.com/thread/92645?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 12:41:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:760cac26-da1d-40cf-bb72-1312a61bfe9c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I assume you define app_gpiote_user_register_param() yourself ?&lt;/p&gt;
&lt;p&gt;Please be aware that app_gpiote is deprecated, and you should use gpiote driver instead.&lt;/p&gt;
&lt;p&gt;Have you tried to follow the documentation ? This code worked for me:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APP_GPIOTE_INIT(1);
    uint32_t  low_to_high_bitmask = (1 &amp;lt;&amp;lt; 13); // Bitmask to be notified of transition from low to high for GPIO 0-3
    uint32_t  high_to_low_bitmask = (1 &amp;lt;&amp;lt; 13); // Bitmask to be notified of transition from high to low for GPIO 0-2
    retval = app_gpiote_user_register(&amp;amp;m_example_user_id,
                                  low_to_high_bitmask,
                                  high_to_low_bitmask,
                                  example_gpiote_event_handler);
    APP_ERROR_CHECK(retval);
    nrf_gpio_cfg_input(13,NRF_GPIO_PIN_PULLUP);

    retval = app_gpiote_user_enable(m_example_user_id);
    APP_ERROR_CHECK(retval);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I found that I need to configure the pin as input after registering to make it work, pretty strange.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>