<?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>Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3623/button-interrupt-not-triggeering</link><description>Hi,
I am using nRF 511822.I have edited the sample code ble_app_uart and tried to interface the button interrupt handler.But the interrupt is not triggering. I have added the functions 
gpiote_init();
and
buttons_init(); 
 static void gpiote_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Sep 2014 17:15:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3623/button-interrupt-not-triggeering" /><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13142?ContentTypeID=1</link><pubDate>Thu, 18 Sep 2014 17:15:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a37fdd2-bbce-41c4-ac30-a1a42896621f</guid><dc:creator>rahul</dc:creator><description>&lt;p&gt;hi Nikita,&lt;/p&gt;
&lt;p&gt;thank you very much.Now interrupt is working fine.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
rahul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13141?ContentTypeID=1</link><pubDate>Sun, 07 Sep 2014 11:16:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66acb0af-1dd3-4ac8-ad73-ac967c05a52e</guid><dc:creator>Vyacheslav Lebets</dc:creator><description>&lt;p&gt;You need call &amp;quot;app_button_enable();&amp;quot; function&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13140?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2014 18:22:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0c935ea-2f86-4fa6-ad36-adaa99cf82fe</guid><dc:creator>Nikita</dc:creator><description>&lt;p&gt;You are not using scheduler in your program so change this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APP_BUTTON_INIT(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, true);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APP_BUTTON_INIT(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, false);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Try to test if button callback ever called with led turn on inside button_event_handler().&lt;/p&gt;
&lt;p&gt;In the main:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_gpio_cfg_output(LED_1);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And in button callback:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void button_event_handler(uint8_t pin_no, uint8_t button_action)
{
    nrf_gpio_pin_set(LED_1);
    if (button_action == APP_BUTTON_PUSH)
    {
...
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13139?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2014 16:49:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78b9454a-b6ec-41e2-b497-fa2875a41650</guid><dc:creator>rahul</dc:creator><description>&lt;p&gt;hi,
i have attached my main.c file.
thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13138?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2014 16:48:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8452a2f9-d969-48c0-b177-4df3e05d45e7</guid><dc:creator>rahul</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0525.main.c"&gt;main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13137?ContentTypeID=1</link><pubDate>Wed, 27 Aug 2014 05:41:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:143da29a-b2ae-4ee2-bf96-eb2d8bab0377</guid><dc:creator>Nikita</dc:creator><description>&lt;p&gt;Show me your main loop. Or better just copy all the main function and post it on pastebin. If you init scheduler then you could just left APP_BUTTON_INIT unchanged.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13136?ContentTypeID=1</link><pubDate>Wed, 27 Aug 2014 04:32:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4ec1569-1d1e-4091-9647-7e8d06eed7aa</guid><dc:creator>rahul</dc:creator><description>&lt;p&gt;I changed to
APP_BUTTON_INIT(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, false);
and also included the init scheduler. But the result is same.
thanks in advance,
rahul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13135?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2014 17:42:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5870fb58-c903-4c5c-b5ef-37a7fb7c0378</guid><dc:creator>Nikita</dc:creator><description>&lt;p&gt;I don&amp;#39;t see you init scheduler. If you don&amp;#39;t use scheduler in your program then change this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APP_BUTTON_INIT(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, true);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APP_BUTTON_INIT(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, false);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13134?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2014 16:54:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e701643-d2a3-4a7c-8bb4-62ea8e08a7b3</guid><dc:creator>rahul</dc:creator><description>&lt;p&gt;These are the functions&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13133?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2014 16:52:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cdf2bf6-6e01-49b4-b621-6f41ca57a292</guid><dc:creator>rahul</dc:creator><description>&lt;p&gt;static void gpiote_init(void)
{
APP_GPIOTE_INIT(APP_GPIOTE_MAX_USERS);
}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13132?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2014 16:49:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7bddbcc-6039-47cc-8291-f06e25ec0a8f</guid><dc:creator>rahul</dc:creator><description>&lt;p&gt;static void timers_init(void)
{
uint32_t err_code;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Initialize timer module
APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);

// Create timers
err_code = app_timer_create(&amp;amp;m_timeout_timer_id,
		APP_TIMER_MODE_SINGLE_SHOT,
		tag_timeout_handler);
APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13131?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2014 16:48:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ebe8e13-3064-436b-8829-355be435a42c</guid><dc:creator>rahul</dc:creator><description>&lt;p&gt;static void leds_init(void)
{
//nrf_gpio_cfg_output(ADVERTISING_LED_PIN_NO);
nrf_gpio_cfg_output(CONNECTED_LED_PIN_NO);
}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13130?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2014 16:33:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47648d20-9fd0-4f44-97f1-83b5a2e2e502</guid><dc:creator>rahul</dc:creator><description>&lt;p&gt;leds_init();&lt;br /&gt;
timers_init();
gpiote_init();
buttons_init();
ble_stack_init();
gap_params_init();
services_init();&lt;br /&gt;
advertising_init();&lt;br /&gt;
conn_params_init();&lt;br /&gt;
sec_params_init();&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//start advertising to connect to a ble device
advertising_start();
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Button interrupt not triggeering</title><link>https://devzone.nordicsemi.com/thread/13129?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2014 14:15:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5300fa18-19d8-4d95-8e45-6a6dd735270e</guid><dc:creator>Nikita</dc:creator><description>&lt;p&gt;Show your initialization code in main function before main loop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>